Unique constraint on combination of two attributes
0
Hi, I want to place unique constraints on combination of two attributes in database, Like i have a coupon code and a 4 digit number as an attributes, So now i want the unique constraints on combination of Coupon code and last a 4 digit number, just like UNIQUE(column1, column2); in SQL. Thanks
asked
RAMA KRISHNA DATT VUPPALA
1 answers
1
Two options:
Create a BeforeCommit-event on the entity. Make that microflow throw an error if the combination of the two values is not unique;
Create an extra attribute, make it a calculated one, and set a unique restriction on that one.