October 23, 201015 yr Hi, I'm new to filemaker and i need some help please. how can i use "," as delimiter so that I can get records each containing a string. ie: ab, bc, cd .... result : ab bc cd ... Thank you !
October 23, 201015 yr Author but the substitute command is used to replace a string with another one?? how can i use it to split a string with a "," as delimiter??
October 23, 201015 yr Ah. But you can replace just one character with another using Substitute() as well, as Barbara is suggesting. Try: TrimAll ( Substitute ( yourfield ; "," ; ¶ ) ; 1 ; 3 ) The TrimAll() is used to remove all spaces.
October 23, 201015 yr Thanks LaRetta. Sorry, zeina, I should have posted a more complete answer for you. Substitute works within FM to convert strings. Is your source file comma-delimited, and you are looking to import this into FM? If so, use Import Records or drag the file onto the FM program icon.
October 23, 201015 yr Author I was trying to use a global variable that contains concatenated values separated by a comma. so I need to split this variable to get the values separately.
October 23, 201015 yr Why is the $$var populated with commas in the first place, then? That raises a red flag to me. Edited October 23, 201015 yr by Guest
October 23, 201015 yr Author because I needed to separate the values with something other then spaces.
October 23, 201015 yr Separate them with carriage returns as you populate the $$var: Set $$var = $$var & "¶" & "newvalue" If I knew more about your script, I might suggest an even better way, such as just use $$var = List (relationship::myField) which puts them into the $$var return-delimited.
Create an account or sign in to comment