Creat function GetValue ( listofValues ; valueNumber ; valueDelimiter )
The function GetValue ( listOfValues ; valueNumber ) is very useful in many cases. It takes values which are delimited by return or symbolized by CR or this special FileMaker symbol.
What is missing is a function to more easily get values which are delimited by other characters, for example tab=char(9), semicolon, comma, etc. And this would also allow to easily parse a table of values which are delimited by returns (lines) and values for each line (tabs, semicolons, commas).
I propose to extend the function GetValue() with just one more parameter. This parameter will contain the delimiting character. If it is empty then it falls back to the default CR. If it is not empty then it uses the delimiting character specified.
GetValue ( listOfValues ; valueNumber ; valueDelimiter )
Here I would also add a token symbolizing a tab character (not to have to write char(9) all the time). Or using a string such as "tab".
GetValue ( listOfValues ; 2 ; ";" ) would then get "Apple" out of a list of values which could be: "Pear;Apple;Banana;Orange".
It should then also be possible to get any value from a list using:
GetValue ( GetValue ( listOfValues ; 2 ; ";" ) ; 3 ) which would get the second item of line 3 of the list of values such as:
The resulting value would again be "Apple".
I know that this is possible using custom functions and other ways, but it would just increase ease of use and be straight-forward.
Especially when return-semicolon delimited data are received from using executeSQL we have to handle such values, parse them, and insert them or use them wherever.
New function SetValue ( listOfValues ; valueNumber ; valueDelimiter )
Why then it should not be useful and possible to also set values in a list of values. Such function would be named:
SetValue ( listOfValues ; valueNumber ; valueDelimiter )
and just set values in a list of values.