Validation workflow

0
Hello I'm trying to create a microflow that validates the data entered in the User and Password fields of a user table to check if they are correct or if they are not registered. I saw that it is necessary to use the Retrieve activity to fetch data from the User entity, but I don't know what the next steps are. Could you explain to me how I can do this?     Microflow     Retrieve Objects       Decision             
asked
2 answers
1

In the retrieve activity, you are getting error in xpath, because in your entity you didnt have name attribute, prob you have syntax error. If you use CTRL+space you can see all the attributes/variables you can use. Choose the right attribute and then in the decision check if the your retrieve object empty or not.  (COLABARODOR = empty ). If its empty you didnt find the record with that name. 

answered
0

Hi Carla,
I am assuming you are doing this from a button on a page.

You will have to make sure that the object used on the page is passed to the button as a parameter. 
Eg the person object contains information that you want to check, you could do a microflow like this

The database retrieve only needs to find 1 record (make sure you use the correct xpath to check)

And the decision can check if the record exists.

Then you can further extend the microflow with actions required in case the user is found or not.

If you want to know how the check for password is executed, you can take a look at the logic in the Administration module (under marketplace modules in your App Explorer)

If you want to experiment setting up user accounts, I can recommend the following learning path: https://academy.mendix.com/link/paths/56/Create-an-App-with-Advanced-Page-Building Section 3.3.3 explains how to use non persitable entities to validate input.

Hope this all helps to bring you a step further.

answered