I am getting the following text from a third party API call. I am looking to extract only the credit card number and the cardholder name from it. How can I make this happen in Appian? Is there any function that could help?
"BBVARewards4000 1234 5678 901012/20VALIDTHRUVISAJOSE MARIA SANCHEZ"
Two suggestions for a start:
1) if the API call will always return data in the exact same format (i.e. always the same number of lines where the same line always has the same info, line 3 = card number, etc) -- use the split() function like split(local!returnText, char(10)), which will give you an array where the credit card number is local!array and the card holder name will be local!array for example.
2) if there might be a little bit of variability to the number of lines, but the data is at least always in the same order, you could also use the extract() function, which will let you extract, for example, everything between "Rewards" and "VALID", or between "VISA" and the end of the string.
Awesome! That's a good starting point.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.