Comparing Local Variable to Local Database. Mobile app

If I input a value to a input box then i will compare to the item number to the database. when i clicked save button it will appear that item number is already in the database. 

Hello Ter,

Can you provide more context on what you're trying to accomplish?

What is the second "If" in the flow testing? Is this flow related to the click action on "Save" button or in another button?

Can you provide a screenshot of (at least part of) your web screen?


Hi Ter,

Do you realized that you didn't "asked" a question?

The proper way to ask questions is:

I want to do this: xyz
I already did this: abc
But it didn't work because i was expecting 123 and I got an error or the result was 456.

In any case, it SEEMS that you want to check if the referred number is already in the database.
I have to ask: did you the online training? Personalized validations are explained in the online materials.

Anyway, what you wants to do is to execute in the beginning of the action an aggregate, filtering by this given Number.
Use an IF to check if the aggregate is empty. If true, it is everything ok, the number does not exist in database.
If FALSE, the number already exists. Set the Valid property of the input to False, set the ValidationMessage to the message you want to give and continue to the nexet validation (probably the Form.Valid one).

Eduardo Jauch 



Your solution works, but is bad practice. Don't do that.
Iterate a list from database is nonsense unless you wanna to process the values, what is not the case.

Use the approach I suggested, that is a standard practice in OutSystems and will perform much better.

Eduardo Jauch