cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Highlighted
Super User III
Super User III

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."

Highlighted
Frequent Visitor

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.

Highlighted
Frequent Visitor

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

Highlighted
Super User III
Super User III

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?

Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,736)