cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nagestiada
Post Patron
Post Patron

Dropdown filter choices

Hi, I have a new form on 'PrimaryList' and want to have a dropdown where choices will come from 'UserInformationList' which only filters the Role="Staff"

 

Filter(
       Choices(UserInformationList.'FullName'),
       Value in Filter(UserInformationList,Role.Value="Staff")
       )

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi@nagestiada, 

Please try to set the Items property of your dropdown control as below:

Filter(UserInformationList,Role="Staff").FullName

Regards,

Qi

Best Regards,
Qi

View solution in original post

10 REPLIES 10
ganeshsanap
Super User
Super User

@nagestiada What is the data type of Full Name & Role fields? Which field you want to show as display value in dropdown? 

Meanwhile check below references if it helps:

  1. How to filter choices() on Combobox 
  2. choices filtered 

Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

Filter(
Choices(UserInformationList.FullName);
Value in Filter(UserInformationList, Role = "Staff").Title)


I tried the code above but it's not working.

I want to filter Role="Staff" and show the fullname from userinformation list on my PrimaryList New Mode

Hi@nagestiada,

Based on the issue that you mentioned, do you want to filter FullName based on the Role column value?

Could you please tell me that if both of these two column are Choice type?

I assume that both of  these two column are Choice type, please try to set the Items property as below:

Filter(
    Choices(UserInformationList.'FullName'),
    Value in ForAll(
        Filter(
            UserInformationList,
            Role.Value = "Staff"
        ).FullName,
        FullName.Value
    )
)

Hope it could help you.

Regards,

Qi

Best Regards,
Qi

@v-qiaqi-msft 

Based on the issue that you mentioned, do you want to filter FullName based on the Role column value? - Yes

Could you please tell me that if both of these two column are Choice type? - Both are not choice type, basically masterlist of all users.

 

Hi@nagestiada,

Have you tried my solution?

Could you please tell me the column type of Role and FullName and which list do they belong to ?

"I have a new form on 'PrimaryList' and want to have a dropdown where choices will come from 'UserInformationList'" This is how you describe your scenario, I guess that these Role and FullName column are all from your 'UserInformationList', is that right?

Provide more details about the Role and FullName。

Regards,

Qi

 

Best Regards,
Qi

Yes, the fullname and role are all from my UserInformationList. - both are single line text not choices

I have primary list which gets orders from customers and want it to assign to the name of the staff on my dropdown.

nagestiada_2-1614065400714.png

 

Hi@nagestiada, 

Please try to set the Items property of your dropdown control as below:

Filter(UserInformationList,Role="Staff").FullName

Regards,

Qi

Best Regards,
Qi

View solution in original post

@v-qiaqi-msft thank you so much for this

 

Another question is: I want to get the email of the selected full name from the dropdown

 

email is also another column in UserInformationList. how can I lookup?

Hi@nagestiada, 

If this Email column is a Text type, please try to add a Label or TextInput and set Text/Default property as below:

LookUp(UserInformationList,FullName=ComboBox1.Selected.FullName,Email)

Note: Combo Box1 is my dropdown control.

Regards,

Qi

Best Regards,
Qi

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,138)