Create error page and function

0
Hi! How do I make it such that the user can only enter the same value once? If the user enters a value that has been entered and displayed in the list view, there will be an error message shown and the entered value will not go through. This is how my microflow looks like right now.  
asked
1 answers
0

The simplest way would be to create a unique index on the value in the domain model.

If you want/need to do this in a microflow you can create a retrieve activity that retrieves the record from the database with the same value for B1 and ensures that it does not retrieve the same record as you are entering with a statement like:

[B1 = $insertValueB1/B1 and id != $insertValueB1]

You can set the option to retrieve just 1 record and after the retrieve check if a record was found, if it was the record is not unique and show validation feedback else store the record.

If the list of values for B1 is very long you can opt to retrieve a list and directly after the retrieve add a count with the aggregate list operation activity and in the decision check if the count != 0.

answered