Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

back again...

this time i need to seperate and split up different words and subjects. i´ve got a list of people_names where each name is seperated by a "|" so that it looks like;

mark|jason|alesandra

and so on. now i want to spilt them up on the "|" to make it look like;

mark

jason

alesandra

and stick them into different fields (or perhaps a valuelist, cant really make up my mind...). ideas? thanks

Posted

You can use the find/replace (under the edit menu) function to replace your vertical line with a space.

You can then use the leftwords and rightwords functions in combination with the replace field contents function to split the names off into seperate fields if that is what you want to do

Phil

Posted (edited)

the thing is that i want a scrpit to do it (all because i dont want to screw up my old records), most for the practice of it, but also because im going to hook this thing up to the net, and the info i get from the net will most likely be in this form...

Edited by Guest
Posted

Check out the functions I mentioned in my post above.

Alternatively have a look here

http://www.fmforums.com/forum/showtopic.php?tid/178116/post/212093/hl//

where a smiliar topic was discussed

Posted (edited)

the thing is that i want to use a button and a scrip to do this for me... i dont want to use the buildin fuunctions of filemaker since when i do, it permanently ruins the records i try to modifiy. basicly i got 2 fields:

1. with the names divided by the "|" - symbol

2. a empty text field into which im gonna stick the divided names.

this i want to do whenever i click the button "split". i just need to scrpit the button now.

Edited by Guest
Posted

Like I said. Look up the functions in the help file. They are all scriptable. If you then have further specific questions by all means come back

Phil

Posted

i dont want to use the buildin fuunctions of filemaker since when i do, it permanently ruins the records

You can keep the original data in one field, and make the other field a calculation field (result is text) =

Substitute ( FieldOne ; "|" ; ¶ )

If you insist on scripting this (why?), you could make the script:

Set Field [ FieldTwo ; Substitute ( FieldOne ; "|" ; ¶ ) ]

This will do one record at a time. You could use a loop or Replace Field Contents[] to operate on the entire found set (provided records are not locked by other users).

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