Input dialog - when string is null or empty, don't stop and re-display input dialog

Hello,

I have an input dialog with free text input form.
The result (typed text) will be strA.

After the dialog there is a message box to confirm the content such as:
“Is the content ’strA’?”

If the “Yes” button pushed, the robot continues.

To judge the content(strA) I placed If activity right after the message box with the condition:
strA.isNullOrEmpty

However, when I run the robot I always get error when strA is Null(don’t type anything and press “Yes” button on the message box).

I would like to know if there is a way to avoid robot stop.

I’ve built multiple robots with this type of input dialogues but this is my first time to have this problem.

Thank you for reading:)

1 Like

Hi, you need to put the if condition before to the message box

1 Like

@yuIko

Put Flow Decision after the Input Dialog box and mention below condition.

          String.IsNullOrEmpty(strA)

If this condition is true then it will go to True side and here again you connect back to Input Dialog box to enter input text again. If above condition failed then it will go to False side and here what ever you want to do it.

3 Likes

Thank you very much for your replies:)
Your advice were very helpful and encouraging.

I was still wondering if I can get the expected result with using Sequence, and
found putting the below formula in If condition works.

StrA = “”

I am not sure why this works and all other similar formula doesn’t work, but it seems for now this is the simplest way I can come up with…

Thank you very much again.

1 Like