I'm trying to transform a registration number (e.g. LS08GHU or AP1) into a variable list
e.g. regNumPos (L, S, 0, 8, G, H, U) or regNumPos(A, P, 1)
I'm nor sure how best to approach this.
Purpose is that the Registration Nr need to be transformed to a number that matches a callers phone dialpad
so:
A, B or C becomes = 2 / D, E or F becomes = 3 / G, H or I becomes = 4 / J, K or L becomes = 5 / M, N or O becomes = 6 / P, Q, R or S becomes = 7 / T, U or V becomes = 8 / W, X, y or Z becomes = 9
So we can match later the input of a users registration number to the data held on file.
Therefore What's the best way to break down the single variable to process each entry and then to concatenate it back to a single string?
Use the Split function to turn the string into a string collection. Then loop thru the collection to convert each value--I'd use a switch action for that. Then use Append to concatenate the converted values back into a single string.
Thanks for that tip, I tried to do the same with our Postcodes and Registration numbers, which are Alpha/Numeric with a space in between, like this:
B44 8JS or B91 2AA however that doesn't seem to work using newValue = split(variableName," ") and then to concatenate postcode = newValue[0] + newValue[1]
I get an error stating '[' at position xx : There is no implementation that accepts parameters of Integer and String.