on 09-07-2011 6:45 PM
Hi. Is there a function that can take the string below, and extract EITHER everything to the left OR the right of the " | " separator? I have many string fields with the same format and need to split them apart. They all contain the same separator but I haven't come across anything that works.
Thanks.
"Communication | 6. Invites feedback, discussion and/or suggestions about his/her own ideas and assumptions"
Hi,
Use this formula to extract everything to the left of "|" :
left(, Instr(, "|")-1);
And, use this formula to extract everything to the right:
Mid(, Instr(, "|")+1, length()); You can even do this using an array: stringvar array a; a := split(, "|");
a[1];
a[1] would have everything to the left of "|" and a[2] would have everything to the right of the "|".
Hope this helps!
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use the Split function. This will convert your string to an array with a defined seperator like:
StringVar myString;
myString := "Communication | 6. Invites feedback, discussion and/or suggestions about his/her own ideas and assumptions"
Split (myString, "|") [1];
This will retrieve the first element in the array which is "Communication ".
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.