cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ch3
Level: Powered On

i need help with a dropdown

Hi, i'm new and i have a little problem with a dropdown. i would show in a dropdown-menu the result of a sharepoint "person or group" column. Additionally should there be a text ("all") in the dropdown menu. 

The Item code for the person result in my dropdown-menu is: 

Distinct('RD-Einsatzmeldung'; Mitarbeiter.DisplayName).Result

but i didnt know, how i can insert the text, too.

 

I think it is not so difficult for an expert. 

1 ACCEPTED SOLUTION

Accepted Solutions
Ch3
Level: Powered On

Re: i need help with a dropdown

Ok, now i solved it. Thanks @mdevaney 

ClearCollect(
    myDrpDownOptions;
    {Value: "all"}
);;
Collect(myDrpDownOptions;ForAll(
        Distinct('RD-Einsatzmeldung'; Mitarbeiter.DisplayName);
        {Value: Result}
));;

View solution in original post

5 REPLIES 5
Super User
Super User

Re: i need help with a dropdown

@Ch3 

To add another value to the dropdown you would need to create a collection and then add "all" to the collection.  Put this code in the OnVisible property of your screen.  The all value will be the 1st option at the top of your options.

 

ClearCollect(
    myDrpDownOptions,
    {Value: "All"}
);
Collect(
    ForAll(
        Distinct('RD-Einsatzmeldung'; Mitarbeiter.DisplayName),
        {Value: Result}
);
        

 

Of course, you will need to change the Items property of the dropdown to the collection.

 

myDrpDownOptions

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Ch3
Level: Powered On

Re: i need help with a dropdown

@mdevaney Sorry, it doesn't work. I think the collection is the right way to solve the problem. Perhaps the Result of a Person displayname makes a problem.  I will something try and hope to solve it. If you found the right way, reply here.

Ch3
Level: Powered On

Re: i need help with a dropdown

Ok, now i solved it. Thanks @mdevaney 

ClearCollect(
    myDrpDownOptions;
    {Value: "all"}
);;
Collect(myDrpDownOptions;ForAll(
        Distinct('RD-Einsatzmeldung'; Mitarbeiter.DisplayName);
        {Value: Result}
));;

View solution in original post

Super User
Super User

Re: i need help with a dropdown

Did my solution work for you?  It appears we just had different formatting?  My PowerApps requires commas whereas yours requires semi-colons, correct?

Ch3
Level: Powered On

Re: i need help with a dropdown

yes, one problem was the formating and the other problem was we forget after the collect the collection. see here: "Collect(myDrpDownOptions;ForAll(" But your solution helped me perfekt. thx

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Users online (4,750)