Hi there,
I have created a table containing the following fields:
i) Status (enum value)
ii) Organization (boolean)
iii) Department (boolean)
iv) Team (boolean)
I then created a grid based on this table. I used all of the fields. The fields are displayed in the following way in the grid:
i) Status (Combobox)
ii) Organization (Checkbox)
iii) Department (Checkbox)
iv) Team (Checkbox)
Now, I want that the user selects a status and ticks the relevant checkboxes to either apply it on organization, department or team. I want the following conditions:
i) When creating an entry, the user must select a status and at least tick one checkbox.
ii) Instead of creating one entry and tick multiple checkboxes for the same status, the user can create multiple entries with the same status and tick the checkboxes individually.
iii) If a checkbox was selected in one entry for that status, it cannot be selected in another entry for that status.
To achieve the above, I created an index with all the 4 fields in it and specified the property AllowDuplicaties to no.
However, the following is still allowed since, for the application, the two records are different:
Status |
Organization |
Department |
Unit |
Refunded |
X |
|
|
Refunded |
X |
X |
|
I want the application to stop the user from inserting the second record since the Organization checkbox was already ticket in the first entry. How can I do this please?