I have three data tables, where two are dimensions with custumors and compliance rules.
In between these I have a table where I manage which rules apply to which customers.
| CustomerID | Customer |
| 1 | x |
| 2 | y |
| 3 | z |
| RuleID | Rule |
| 1 | a |
| 2 | b |
| ComplianceID | RuleID | CustomerID |
| 1 | 1 | 1 |
| 2 | 1 | 2 |
| 3 | 2 | 1 |
In this example, rule a applies to customer x and y, and rule b applies to customer x, and customer z has no rules that apply.
I would like to not fill my table with all possible combinations of the two tables and have an active column, but only save the ones where it applies.
I would like in my app to have one gallery where you can select the customer you want, and then have it refer to another gallery, where you have a list with checkboxes for all the rules. If the combination exists, I want the checkbox to be checked. I can make that happen. If you check the box, and the rule does not exist, I would like the save button to add row as a combination in the compliance table. If the box is checked, and the user unchecks it, I would like the row to be updated to be inactive and have an enddate.
I can't seem to figure out what the best way to do this would be, if I should use Patch, and if Patch can even work across all gallery items.
The way I lookup to see if the value exists in the compliance table is by making this lookup:
LookUp(Compliance, Customer = TableCustomer.Selected.Name && RuleId = ThisItem.Id, true)
And the Items are just the values from the Rules table.
Hope this makes sense 🙂

Report
All responses (
Answers (