r/filemaker • u/Crowdfunder101 • 9d ago
How do I create a simple code/decode script?
I want to teach FileMaker that (for example) A=1 B=2 C=3 D=4 E=5
So that if I have a bunch of records with a ‘code’ field pressing a button will decipher it. So BAAED becomes 21154 or CEB becomes 352.
Ideally I’d like it to loop through all records in one go. What is the fundamental function that I should be looking at here?
Edit: SOLVED
As suggested, the substitute function works well for this. My solution was to use Set Field, then use Substitute within the calculation for that. I chose Set Field because it lets me keep the original Code in letters and then converts it to numbers in a separate field.
Substitute ( TestTable::Code ; ["A" ; 1] ; ["B" ; 2 ] ; [ "C" ; 3] ; ["D" ; 4 ] ; ["E" ; 5] )
Then it runs that as a script trigger after I enter some Code into a field and exit that field.
1
Would you hold Apple RSUs in this market or no
in
r/applestocks
•
1d ago
What country are you in? What taxes would you pay upon selling? Personally I would sell, sit it out and then buy back in.