cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
688
Views
5
Helpful
3
Replies

CVP Delete last Digit

Ahmed Adeyemi
Level 4
Level 4

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.

3 Replies 3

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

Thanks David, I will try this out and let you know.

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)