FMNan Posted November 18, 2005 Posted November 18, 2005 I am at a loss on this & would appreciate any help. I have a field that offers the user a choice of "names" in the form of Checkboxes. Users can select either 1 or multiples, and the "list" of chosen will differ each time (can have 1 name or 15 names). What I need to do is to use each "name" on the list, one-by-one. I've tried to work with "Word Count", but the "names" have word spaces, hyphens & underscores -- all which seem to trigger FM to see them as word breaks. I've been playing with Left, Middle, & Right -- but have not been successful. Does anyone have any suggestions or methods to use these Names, in a calculation/script, value list, repeating field, etc. -- anything that would give me the ability to grab the names 1-by-1 and use them to populate a field in a record? All answers are much appreciated! Thank you
Raybaudi Posted November 18, 2005 Posted November 18, 2005 A simple calc that generate a list of cheked items of field YourCheck: List (result text) and calc: [color:green]YourCheck BTW the same result is given by a new occurence of the same field (YourCheck), but formatted as EditBox ! :)
FMNan Posted November 18, 2005 Author Posted November 18, 2005 Thanks for your quick reply. I am able to have a field automatically capture the checkbox choices very easily. What I'm having trouble with is then using each "name" in the list, 1 by 1, in a script to populate a field. Example, list has: one-name two-name three-name Now I need to grab "one-name" and use it to populate a field. Then loop to grab the next one in the list & so on til I can exit the loop. This database is in version 6 & not slated to be upgraded in near future, so I can't use any of the new nifty things in 7/8. :)
Raybaudi Posted November 18, 2005 Posted November 18, 2005 Ok make a field (number)Row make another field (calculated text)TextExtracted and calc: [color:green]Middle( YourCheck ; Position( YourCheck; "¶" ; 1 ; Row - 1 )+1 ; Position( YourCheck & "¶"; "¶" ; 1 ; Row )-1) the field TextExtracted will show the NthRow of YourCheck : The same calc can be made in a script, something like: Set field [Row;1] go to field [Row1] Loop Insert calculated result[select;Middle( YourCheck ; Position( YourCheck; "¶" ; 1 ; Row - 1 )+1 ; Position( YourCheck & "¶"; "¶" ; 1 ; Row )-1)] Go to next field Set field [Row;Row + 1] Exit lop if[Row = 16] End Loop Naturally those values have to go into fields: Row1, Row2,...Row15 and those fields must be in order !
comment Posted November 18, 2005 Posted November 18, 2005 IIRC, this is how we used to do it before version 7. ListToRepeating.fp3.zip
Raybaudi Posted November 19, 2005 Posted November 19, 2005 IIRC = If I Recall/Remember Correctly. Hi comment yes, you do. But she wished separate fields !
comment Posted November 19, 2005 Posted November 19, 2005 Did she? Does anyone have any suggestions or methods to use these Names, in a calculation/script, value list, repeating field, etc. Perhaps if we knew the end purpose of this, there might be a shorter way.
Recommended Posts
This topic is 7292 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 accountSign in
Already have an account? Sign in here.
Sign In Now