UiPath APPS - check mandatory value in the field

Hi,

in UiPath APPS I am checking for the value in the field, but it does not work.
In submit button “Search” I defined “Error”:

I want the workflow not to start before mandatory fields are filled out.

I have set the same if-then-else in “when started”, but it also does not work.

What am I doing wrong?

Thx and Kind Regards,
Vanja

Please try to click on the “?” and do a String to String conversion on both sides.

thanks

Hi @AndyMenon

I have tried:

image

image

and

image

image

Both neither work…

Also, how to set it for date?

image

Thx for suggestion.
Kind Regards,
Vanja

You don’t need the double-quotes on the right. Simply set it to string and empty on the right.

Here is a screen grab from one of my Apps and it has been proven as working.

The data types are set to string on both sides
On the right, the text boxes are left blank when comparing to empty string values

image

Another thing I would recommend is that you Group your validation conditions even if you have only one condition to validate. I say this because at least in the current version we cannot move conditions into a group if you decide to group them later.

Example: Today the condition might be

Some_Field_Value = Empty

You don’t need a group for single conditions. But if your condition becomes more complex then you have to redo these if you haven’t grouped them from the get go.

Here is another bogus example that may not work as you think it should unless grouped correctly because you have an And and Or:

Without Grouping:

Some_Field_Value <> Empty  
And 
Some_Field_Value_2 ='Hello'
Or 
Some_Field_Value_2='World'

With Grouping (looks reasonable, readable, & easy to maintain in the future)

[
Some_Field_Value <> Empty
]
And
[
Some_Field_Value_2 ='Hello'
Or 
Some_Field_Value_2='World'
]
And
[
another group
]

You see that the first condition is still grouped even though it is only one condition. If you want to add additional conditions in the first group later it is easier in the future. If not, you have to rebuild the whole thing from scratch (at least that is how it was when I built this app)

The date might be tricky. It must most likely be the same format on both sides as well

Hi @AndyMenon

Woow. Thx. :slight_smile:

Tell me please also, where did you put it in? In Submit button before running the workflow or under errors in section running the workflow or … ?

Kind Regards,
Vanja

Hi @VanjaV,

I put it in on the Button Click Event.

If any of the form inputs were blank then an Error label would be made visible on the form with validation failure message. If not, a Start Process would be called to run the automation.

:slightly_smiling_face::+1:

1 Like

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