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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

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