cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Clean Collect

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

3 REPLIES 3
Super User III
Super User III

@jesenavaranjan 

Jese,

Change your formula to the following:

ClearCollect(DGDrop,{Result:"All"}); Collect(DGDrop, Sort(Distinct('[dbo].[tbOrgStructure]',DG),Ascending))

Hope that gets you going.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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

@jesenavaranjan 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (2,209)