Hi all,
Can you help regrading below requirement.
I have a data table called “Cities”, it consists of columns called City, Pin code, Area, Country name. We developed UI to allow the user to add city to the cities DB table.
when user trying to add new city, i should restrict adding when any 3 out of 4 properties matches with any of the existing records in “Cities” table.
How can i achieve above requirement? Do we have any OOTB functions which can help me?
Thanks in advance..!!
@DineshBhargav.V I guess you would be having 4c3 =4 combinations
- city pincode area
- city area country
- pincode area country
- country city pincode
You can try the below approach
Create a report definition of all these 4 combinations with logic AND between the columns of a combination and OR between each combination
eg.., (city AND pincode AND area) OR …
Override the pyPreGridUpdate update activity to check if the above report returns a row if it does set an error message.
@BhanuPrakash_G Thanks for responding. In order to reduce the effect of complex filter conditions on DB query, we developed logic to check duplicate entries using @IsInPageListWhen. When rule that we called in this OOTB function is responsible for checking the combinations that I mentioned in the post.