I don't think you'd need a loop if this letter for number encoding is exactly the same each time.
Substitute ( YourTable::NumberField ; [1 ; A ] ; [ 2 ; B ] ; [ 3 ; C ] ; //and so forth for each possible digit )
would replace the digits with letters without any loop.
A more sophisticated version of this might even work if you stored the subsitution letters in a related table with one record for each digit/letter pairing.
That is my issue, the letter figures may not always be the same. I also need to look up corresponding values for each number, in addtion to the corrsponding letters so I can make some caluculations, but one step at a time...
If you had a table, codes, defined like this:
Letter | Code
A | 3
B | 1
C | 2
and so forth....
You can set up this relationship:
Maintable::anyfield X Codes::anyfield
and specify that the relationship be sorted by Code in ascending order.
Then your subsitute function could be defined as:
Let ( LetterList = List ( Codes::Letter ) ; Substitute ( YourTable::NumberField ; [1 ; Getvalue ( LetterList ; 1 ) ] ; [ 2 ; Getvalue ( LetterList ; 2 ) ] ; [ 3 ; Getvalue ( LetterList ; 3 ) ] ; //and so forth for each possible digit )
It's also possible to define a recursive custom function that does this one letter at a time if you have FileMaker Advanced
Thanks. Will give it a try.
I also have FileMaker Advanced.