Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

string lenght

Hello everyone    

In my script by using "get digit string" menu i get customers unique  number but i want that to be at least 5 character long.For example i do not want him to enter "123" he must enter at least 5 digits.when he enters least then 5 digits i want to play a warning prompt and turn back.I will use  "if" menu i think.How can i do that ?

Thank you...  

6 REPLIES
Green

Re: string lenght

Minimum length 5, maximum length 5. This would not require the use of a termination character (typically the # key).

This is surely in the documentation.

Regards,

Geoff

Re: string lenght

So you have 5 digits. ABCDE.  You will have to check ABC, BCD, CDE, so that's three checks.  Then you have to figure out if they used three sequential numbers either increasing (e.g. 123) or decreasing (e.g. 321).  The easiest way to do this would be to subtract the first and last number from every set of three digits, if it's 2, then they are using sequential numbers.  For example:

25673

First check: 256 |2-6|=4 PASS

Second check: 567 |5-7|=2 FAIL

Third check: 673 |6-3|=3 PASS

This is just a thought.

david

Green

Re: string lenght

What am I missing here?

If you set the minimum number of digits to 5 and the maximum number of digits to 5 and disable any termination key, the user cannot do anything but enter 5 digits.

Regards,

Geoff

Re: string lenght

Interesting reply, but did you reply to the wrong post by mistake?  This seems like it came in from left field.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Re: string lenght

The get digit string step has a maximum length value which you would set to 5, and yes that is documented.

However, what it lacks is a minimum value to set.  Anything less than the maximum, and without a terminating key (i.e., #), would fall to the Timeout branch.  In the timeout branch you would check the resulting input's length.

CED = Get Digit String(--Trggering Contact--, p[please_enter_account_number])

     Successful   

          ...

     Timeout

          if (CED.length() > 0)

               True

                    Play Prompt(--Triggering Contact--, p[too_few_digits])

                    ...

               False

                    Play Prompt(--Triggering Contact--, p[no_input_detected])

                    ...

     Failure

          ...

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Green

Re: string lenght

avholloway wrote:

The get digit string step has a maximum length value which you would set to 5, and yes that is documented.

However, what it lacks is a minimum value to set.  Anything less than the maximum, and without a terminating key (i.e., #), would fall to the Timeout branch.  In the timeout branch you would check the resulting input's length.


Thanks for the informtion - I do CVP, and just assumed - because CVP has the minimum, that CRS/IP IVR would also have it.

All I can say is that the IP IVR implementation is broken. It should be fixed - put in an enhancement request.

Regards,

Geoff

248
Views
3
Helpful
6
Replies
CreatePlease to create content