Flow decision is not resulting. Checking if input dialogue is empty will not loop back to dialogue

Hi there!

I ran into this problem while attempting the Academy lesson on Data Manipulation. I downloaded the solution and copied it exactly, step by step. Am I doing something wrong?

  1. Flowchart starts and asks for input dialogue.
  2. Input dialogue result is stored in a string variable called InputVariable.
  3. That string variable is in a flow decision condition written as: InputVariable is Nothing.
  4. If true, it should loop back to the input dialogue and prompt user for input again.

It doesn’t matter if the input is blank, or filled with text, it will always return “False” regardless.

I understand that I can use String.IsNullOrEmpty(InputVariable) and that works as expected. But I was trying to follow the solution to the exercise and I would like to understand where I went wrong. The downloaded solution works flawlessly, while mine does not and I copied it exactly.

I would appreciate any feedback on this and have attached my xaml file if someone can please help me :slight_smile:
Main.xaml (8.2 KB)

hey

image

it means that your variable is specting a null value, you string value is not null, is empty but not null, the correct validation is to use the

String.IsNullOrEmpty(InputVariable)

also you can see that nothing is not a suggestion because is not the best way

ex:
when you process starts you variable is null, no value has being defined

when you leave blank your input dialog activity, it will get a value now, that value is empty but not null, so the flow decisition will be always false becase the value is empty, not null

Regards!

Thank you so very much for explaining this to me! I really do appreciate it. I definitely better understand the logic behind this now! I just couldn’t understand how the Academy solution used the condition “is nothing” and it worked lol

That was so kind of you to explain this to me in such detail and I’m extremely grateful!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.