ClearCollect(DGDrop,{DG:"All"}); Collect(DGDrop, Sort(Distinct('[dbo].[tbOrgStructure]',DG),Ascending))
I'm trying to use this formula to create a list which includes "ALL" and a Distinct list from a table.
But when I reference my dropdown with 'DG Drop' - I see no values
Can anybody help?
Jese
Jese,
Change your formula to the following:
ClearCollect(DGDrop,{Result:"All"}); Collect(DGDrop, Sort(Distinct('[dbo].[tbOrgStructure]',DG),Ascending))
Hope that gets you going.
Thank you , that helps but now
Distinct(Filter('[dbo].[tbOrgStructure]',DG=DGD.Selected.Value),Directorate)
I have a cascading dropdown, how Do i collect the connect items and then add a 'ALL'?
Please and thank you
Jese
Jese, you would do it the exact same way:
ClearCollect(yourCollection, {Result:"ALL"}, Distinct(Filter('[dbo].[tbOrgStructure]',DG=DGD.Selected.Value),Directorate))
You would most likely put this on the OnChange action of your first DropDown control.
I would normally do this on the Items property itself, but in this case you need to "collect" and "add" (the "ALL"), so it needs this formula.
Make sure your DropDowns are using the Value of Result (in the properties pane).
Hope this helps.
User | Count |
---|---|
221 | |
99 | |
93 | |
55 | |
37 |
User | Count |
---|---|
272 | |
105 | |
104 | |
60 | |
60 |