Does anyone know how to automatically validate duplicate row entry on a list view based on the first column either during each row entry or on form submit/validate.
Or ignore the duplicate value when list is called?
This is wrong:
Does anyone know how to automatically validate duplicate row entry on a list view based on the first column either during each row entry or on form submit/validate.
Or ignore the duplicate value when list is called?
This is wrong:
Best answer by JonathanT
Here's a proof of concept for SmartForms that checks for duplicate entries of a column over all rows:
- You can't normally nest 'For' loops but if you create the inner loop in an unbound rule you can use 'execute another rule' to inject it.
- Outer loop sets currentString to the current row's value (the title in this case).
- Inner loop checks for a duplicate. There will always be one duplicate per check because the loops are iterating over the same list, so I set dupsFound to -1 and then check if it's '> 0'
- Iterate dupsFound is an expression that just returns 'dupsFound + 1'.
- If 'dupsFound > 0', set valid as false, then display the result in a message. You can replace the last part with logic that prevents saving and/or warns the user about duplicate entries.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.