Combo box 1
Combo box 2
Item property of combo box 1 - Distinct(Equipments_List, alpha_)
Item property of combo box 2 - Distinct(Filter(Fruits_List, alpha_ = ComboBox1.Selected.Result), name)
I have been able to make the first combobox depend on the second combobox. I’m not able to make the second combobox depend on the first combobox.
Kindly help.
Hi @sahilauzim ,
Can you try to refer the solutions from this post?
Combo Boxes Depend on each other/Circural Reference .
And see if through this post could solve your problems. If yes, please Accept as Solution.
Thank you.
I'm getting an error. It will be grateful if you can provide me a solution with an example. Thanks
Instead of putting the Distinct Filter functions in Items properties, can you copy and paste the same code to DefaultSelectedItems properties?
You can remove the code for OnChange properties.
As combobox need Default selected items property to read for default selected.
Hope it helps.
I have use another example.
I have paste the same code on DefaultSelectedItems. The unit number is working good. That is, it is dependent on the serial number.
The code I have used.
But I'm not able to make the Serial Number to be dependent on the Unit Number.
Click your Serial Number combobox and see at its depends on..
Is it depends on to Unit Number combobox? If it is not, you can set it.
Is it solved?
The trick to avoiding a circular reference with interdependent comboboxes is to use a collection of the selected items from each combobox using the combobox's OnChange property: ClearCollect(colserial,Self.SelectedItems) for combobox1 and ClearCollect(colunit,Self.SelectedItems) for combobox2. Then set the Items properties of each combobox as follows:
For the Items property of Combobox1:
Sort(
Distinct(
Filter(
Equipments_List,
SerialNumber in colserial|| IsEmpty(colserial)
),
'Unit Number'
),
Result
)
and for the Items property of Combobox2:
Sort(
Distinct(
Filter(
Equipments_List,
UnitNumber in colunit || IsEmpty(colunit)
),
SerialNumber
),
Result
)
You may need to correct the column names but hopefully you get the idea.
It is still not good.
In my case, the 'unit number' is title as I have to use a unique column. I have rename the column name
(1) For the serial number on Items' property
(2) For the unit number (which is title in my case) on Items' property
I assume you have done the clearcollect for each combobox?
ClearCollect(colserial,Self.SelectedItems) for combobox1 and ClearCollect(colunit,Self.SelectedItems) for combobox2
What is the error for colunit ya? And can you add bracket after Result, as you missed the end bracket.
yes, I have done the clearCollect for each combobox.
The error is :
Another issue, there is no data in the unit number combobox
User | Count |
---|---|
253 | |
113 | |
92 | |
48 | |
38 |