I would like to assign values to letters: A=0, B=1, C=2, D=3, E=4, F=5, G=6, H=7, I=8, J=9 and take user input from text field, for example ‘FAA’, and concatenate the number values of the user input, in the example FAA the value would be 500, then be able to take that value of, e.g., 500 (or whatever the value – if input were ECA the value would be 420) and perform a calculation with it, e.g., 2000 – (value of FAA) = 1500.
The specific application of this is an EchoSign PDF using JavaScript formulas in calculated fields that needs to take a ‘promotional code’ value input by the user, e.g., FAA, and deduct that amount from the full price field then show the new amount in the discounted price field.
Make an object with properties a, b, c etc. this will act as an map. E.g.
Now iterate the string your trying to make value from
You may need to check for value bounds for
ansif string is too long