12-20-2018 03:31 PM - edited 03-14-2019 06:41 PM
Can anyone assist in deleting Digits in CVP? Essentially, i am running a Audio Digit Element which essentially collects a number of digits. The digit length is a variable which could be between 5 to 10 digit long. I would like to use a # or * to terminate the digit but would like to strip the * or # at the end of it value collected.
I have tried to use a Decision element but i'm not sure how to strip the * or # off the digits collected.
12-20-2018 07:08 PM
If you use a Set Value element you could then add settings and apply them to a local variable, these settings use JS. For example:
"20"+{Data.Element.get_FraudSuspendStrategyDate.result}.substring(0,2)+"-"+{Data.Element.get_FraudSuspendStrategyDate.result}.substring(2,4)+"-"+{Data.Element.get_FraudSuspendStrategyDate.result}.substring(4,6);
So notice that I'm using the substring function to turn my get_FraudSuspendStrategyDate variable to the format 20xx-xx-xx. I hope this helps.
david
12-25-2018 09:52 AM
Thanks David, I will try this out and let you know.
12-27-2018 09:06 AM
Thanks for your response David. Please do you mind explaining how I can extract the data from the set value element.
Thus far, I have created the name and value within the set value element. I can see the element seems to be running successfully but I'm not sure how to get my output..
In my case I set my "Set Value Element"
name = strCED
Value = {Data.Element.CED.value}.substring(0,2)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide