Filtering based on integer

(David Grünbaum) #1

Hi!

I wonder if it is possible to filter an answer based on whether the response is an integer or text.
I want to make sure that the system catches the number even if the number is written as a whole or with a space in between.

The different response scenarios are:

  1. number written without spaces: 12345
  2. number written with spaces 1 2345
  3. Random text written: I don’t have the number.

if I use “text” as the response: I can catch scenario 1 and 3. If I use number as a response I can catch scenario 1 and two.

Is there a way to ask for an integer and jump to the next question if I don’t get an integer?

(Karen Barker) #2

Hi David,

If you ask for an integer and the validation on the question fails then the user will be asked the same question again dependent on the number of attempts you allow. If they again enter something other than an integer and the attempts are exhausted the flow will fail to run.

If you want to always be able to accept the answer even if the user doesn’t send the requested integer it’s best to leave the question without any validation then it will always continue.

1 Like
#3

Hi @david1,

you should use a text without validation and then use a code action to validate answer using javascript