I have 3 combo boxes, which link to 3 columns in a dataverse table.
I would like to have each combo box change it's options depending on whether another combo box already has something selected.
For example: -
ComboBox1
Dataverse Column Name = Production
Production Entries = ProductionA, ProductionB, ProductionC
ComboBox2
Dataverse Column Name = Episode
Episode Entries = Episode1, Episode2, Episode3
ComboBox3
Dataverse Column Name = Operator
Operator Entries = Operator1, Operator2, Operator3
So if someone selects ProductionA in ComboBox1, ComboBox2 will only show Episode values that were used on the same row as ProductionA. The same applies to ComboBox3.
Here's the code I have on my ComboBoxes...
Distinct(DataverseTable, Production)
Here's the code I have on my Gallery...
Filter(
DataverseTable,
Or(
IsBlank(cmb_Production.SelectedItems),
IsEmpty(cmb_Production.SelectedItems),
Production in cmb_Production.SelectedItems
),
Or(
IsBlank(cmb_Episode.SelectedItems),
IsEmpty(cmb_Episode.SelectedItems),
Episode in cmb_Episode.SelectedItems
),
Or(
IsBlank(cmb_Operator.SelectedItems),
IsEmpty(cmb_Operator.SelectedItems),
Operator in cmb_Operator.SelectedItems
),
Or(
txtbox_1.Text in Production,
txtbox_1.Text in Episode,
txtbox_1.Text in Operator
)
)
(I have a text box as well for searching but this isn't essential)
The above code works great, but it doesn't change the other comboboxes options when you select an item within ComboBox1 for example.
Hopefully all makes sense!
Any advice, great appreciated.
Many thanks,
Rob