Jump to content
Sign in to follow this  
Don_Macaroni

Equivalent feature of PHP Explode

Recommended Posts

Hi,

I'm breaking my brains over something that should be as easy as 123. I have a global text field where a user inputs a 'period-' or 'comma-' separated text in a custom dialog box. I then want to run a script that separates those values, eg. "456123.785412.255879.225788" and creates a new record for each of them.

I used PatternCount(text, ".")+1 to have a variable for the loop, but how do I extract the actual values? As php explode and a while loop would do...

Help appreciated.

Share this post


Link to post
Share on other sites

Set variable ( $values ; Substitute ( global text field ; [ "." ; ¶ ] ; [ "," ; ¶ ] ) ]

Loop

Exit Loop if [ IsEmpty ( $values ) ]

New Record/Request

Set field [ yourTable::yourField ; GetValue ( $values ; 1 ) ]

Set variable [ $values ; RightValues ( $values ; ValueCount ( $values ) - 1 ) ]

End Loop

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.