Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Split String in expression

Hello everyone.

I have string as under

=subfield('asc@asd@gdds@fdfr@mnd','@')

Resulting strings

asc

asd

gdds

fdfr

mnd


I would like to split string in expression. The length of the string could very with '@' as separator. I want to dynamically split this string based on '@'

Thank you in advance.

6 Replies
MayilVahanan

Hi

     Try purgeChar('asc@asd@gdds@fdfr@mnd','@') gives 'ascasdgddsfdfrmnd'

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks,

I do not just want to take out @, it is split of a string and one row gets converted in to multiple rows.,

Just a wage example.  If i put that expression in list box, it will give me 5 items to select.

Any idea please?

sivarajs
Specialist II
Specialist II

I guess you have already done. Lets try this in your script

subfield(Filedname,'@')  as new_field

Not applicable
Author

Thanks,

It works in script,

I wanted in expression on the fly. Is there way to achive it?

Thanks..

sivarajs
Specialist II
Specialist II

Can you explain how should your output looks like?

Anonymous
Not applicable
Author

Not sure what could be the use of it, but it is possible to present it this way using ValueList().
Create a straight table with calculated dimension:
ValueList(1,2,3,4,5)
Expression is:
subfield('asc@asd@gdds@fdfr@mnd','@',ValueList(1,2,3,4,5))

Regards,
Michael