Set Variable [ $text ; table::yourfield ]
Set Variable [ $i ; $i + 1 ]
Set Variable [ $newtext ; List ( $newtext ; $i & " " & GetValue ( $text ; $i ) ) ]
Exit Loop If [ $i = ValueCount($text) ]
Set Field [ table::yourfield ; $newtext ]
You could also write a recursive custom function that will do all of this in the calculation engine.
2 of 2 people found this helpful
If you have FMP advanced, you can make use of the custom function included in the attachment.
If you don't have it, you can use the script included as well.
Your answer is correct as well - thought I could click on both as correct. Thanks so much.
Thanks for the quick answer.
you can mark other useful answers as "Helpful".
Here's one more example of a custom function that seems to work. This one puts a period and a space after the number. (Thanks to Dale Miller)
Number_Lines (input, start)
If (not is empty (input);
start & ". " & GetValue (input; 1) & if (ValueCount (input) > 1;
¶ & Number_Lines (MiddleValues (input; 2; 99999) start + 1)); ""
download again the solution I posted, it allows you to define freely the separator between the number and the line (it can be space + ")" + tab + ". " or whatever you want.
Yes, I saw that. Just wanted to point out I'd done it in that last sample, which is no better than yours, just slightly different.
Sent from my iPod