Jump to content

String splitting


Flo

This topic is 4997 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi there :P

I'm getting mad trying to do something (which would be very very easy in Java or PHP) in FileMaker.

Here is the thing :

I have a list of modules I get from a checkbox. This looks like this :

AA

BG

BR

SR1

SR2

...

And I would like to store each module in a tab (a variable with repetition in fact).

If all module were written with 2 letters, that would be easier... but it's not the case ;o)


Set Variable [$mod_list; Value:Global::G_Export_Module_List]

Set Variable [$mod_list_tab; Value:""]

Set Variable [$repet; Value:1]

Loop

 //It's here I need your help ;-)

End Loop

Thank you in advance for your help !

F.

[color:red]EDIT :

Check the custom function "split" which might be helpful : http://www.briandunning.com/cf/45

Edited by Guest
Link to comment
Share on other sites

I think you're looking for something like this.

Set Variable [$mod_list; Value:Global::G_Export_Module_List]

Set Variable [$mod_list_tab; Value:""]

Set Variable [$repet; Value:1]

Set Variable [$mod_Count; Value: ValueCount($mod_list)]

Loop

//It's here where I'm attempting to help ;-)

Set Variable [$mod_list_tab[$repet]; Value:GetValue($mod_list; $repet)]

Set Variable [$repet; Value:$repet + 1]

Exit Loop If [$repet > $mod_Count]

End Loop

Link to comment
Share on other sites

This topic is 4997 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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