Jump to content
Server Maintenance This Week. ×

Parsing multiple values into sub-records


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

Recommended Posts

I have a Text field in which a client has entered multiple keywords separated by semicolons, like so:

Animation; Experimental; Comedy

I have created a sub-table to hold individual keywords so they can be better manipulated in various ways. So I need to run a script to break out the three values and create 3 sub-records for the above examples.  Fortunately, the records are very consistent in their use of semicolons and a space to separate the values. (And semicolons are not used for any other purpose within the entries).  

I assume I'll create a looping script to perform an iterative process on each record, using the semicolons as markers, right?  I'd could use the Position function to find where the semicolons are and then use the LEFT text function to chop off the first word, etc etc, right?

It's been a long time since I've done this sort of thing and am rusty on the process. Are there any field replacement calculations I could do to make my task simpler?  I just get a feeling I may be overlooking a useful tool of some kind.

Thanks!

Link to comment
Share on other sites

Start by substituting the existing separator with a carriage return to get a return-separated list. Then use GetValue ( $list ; $i ) to get the individual keyword values, increasing $i until it reaches ValueCount ( $list ).

Note
Not sure what you mean by "better manipulated in various ways". Filemaker is pretty good at manipulating return-separated lists, so it could well be all that you need to do.

 

Edited by comment
Link to comment
Share on other sites

This topic is 2058 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.