Avoid duplicates

1
I want to control the entry of values ​​in a textbox without repeating the values ​​and indicate a repetition message
asked
3 answers
1

Hi youssef,

                 If you want to avoid the entry values does not to be duplicated, you can retrieve the entire data’s from database and do iteration over it. If the input textbox value matching with iteration object values, you can change the boolean variable to TRUE. After that, you can make a decision to whether it is committed into database or not. For your reference, I have created the microflows for avoid the duplicate entry values. I hope it will help you.

 

answered
1

Hello youssef elhaoudi, for this issue, you can add validation rules like unique constraints in your attribute in your entity or even at page level. Better choice will be if you do this validation using a microflow, there you can add some comment in feedback validation like this is a repeated data.

answered
0

If you do not want duplicates in your list, you can either remove the object first, or use the Contains list operation to examine the list before adding the object. Currently, this works differently in nanoflows and microflows.

 

https://docs.mendix.com/refguide/change-list#:~:text=If%20you%20do%20not%20want,differently%20in%20nanoflows%20and%20microflows.

This is Medix Documentation for the reference.

answered