Duplicate Object - Validation Microflow

0
  Hi,   I am trying to get my validation to check for duplicates irrespective of case. I have done the below, I believe it worked previously but it is definitely not working now. It puts a validation for if it is exact just not if I do the same word but capitals. Any ideas of what I need to do please?       I have another issue in that it is working if I duplicate exactly, case sensitive. Except for the last one xxx. Any ideas why that would be?   Thanks   Jess    
asked
2 answers
0

Your database retrieve works, but in the split your comparing names (case sensitive(!)). Changing the the split to “$ObjectWithSamenName = empty” should do the trick

answered
1

Hey Jessica!

When I want to compare to strings to see if they’re the same, regardless of case, I end up using the string function toLowerCase()

So in your logic it would look like:
toLowerCase($ObjectWithSameName/CompanyName) != toLowerCase($Company/CompanyName)

Another option would be to put a uniqueness validation on the CompanyName field. More info on how to do that can be found here:
https://docs.mendix.com/refguide/setting-up-data-validation/#2-data-validation-on-entity-level

Hope this helps!

answered