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

Filter Dropdown based on User (Variable)

How can I get my drop down to show certain items based on a collection or (preferably) a Choices Column from a Sharepoint list based on the variable "is user___" without this awful duplication. Because in my scenario multiple people will be in multiple groups.

 

Thanks!

 

Here's code to copy paste for my collection (column name i would rather use is called Status):
Clear(StatusDropDown);

If(isuserinSPGroupN11B4, Collect(StatusDropDown," Signature Pending"," Returned to Submitter", "Cancelled" ));
If(isuserinSPGroupN13A, Collect(StatusDropDown, "Manager Approved","Cancelled"));
If(isuserinSPGroupCommanderAccess, Collect(StatusDropDown, "Signature Pending"," Returned to Submitter", "Cancelled" ," Manager Approved",));

 

Highwaywoman_0-1661446515271.png

tagging @RandyHayes just because 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Highwaywoman 

Skip all the collections!!

 

Change your Items formula to the following:

Filter(
    Table({Value: "Signature Pending", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess},
          {Value: "Returned to Submitter", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess},
          {Value: "Cancelled", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess || isuserinSPGroupN13A},
          {Value: "Manager Approved", en: isuserinSPGroupN13A || isuserinSPGroupCommanderAccess}
    ),
    en
)

 

This will give you what you want without all the hassle of collections, and behavioral action formulas.

 

I hope this is helpful for you.  (just because 🤣)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@Highwaywoman 

Skip all the collections!!

 

Change your Items formula to the following:

Filter(
    Table({Value: "Signature Pending", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess},
          {Value: "Returned to Submitter", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess},
          {Value: "Cancelled", en: isuserinSPGroupN11B4 || isuserinSPGroupCommanderAccess || isuserinSPGroupN13A},
          {Value: "Manager Approved", en: isuserinSPGroupN13A || isuserinSPGroupCommanderAccess}
    ),
    en
)

 

This will give you what you want without all the hassle of collections, and behavioral action formulas.

 

I hope this is helpful for you.  (just because 🤣)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,297)