zeina89 Posted October 23, 2010 Posted October 23, 2010 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 !
zeina89 Posted October 23, 2010 Author Posted October 23, 2010 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??
LaRetta Posted October 23, 2010 Posted October 23, 2010 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.
bcooney Posted October 23, 2010 Posted October 23, 2010 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.
zeina89 Posted October 23, 2010 Author Posted October 23, 2010 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.
bcooney Posted October 23, 2010 Posted October 23, 2010 (edited) Why is the $$var populated with commas in the first place, then? That raises a red flag to me. Edited October 23, 2010 by Guest
zeina89 Posted October 23, 2010 Author Posted October 23, 2010 because I needed to separate the values with something other then spaces.
bcooney Posted October 23, 2010 Posted October 23, 2010 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.
zeina89 Posted October 23, 2010 Author Posted October 23, 2010 okk great 10x alot Laretta and barbara
Recommended Posts
This topic is 5215 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now