cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmistry
Post Prodigy
Post Prodigy

Loading drop down values along with filter on a field

Hi,

 

In a powerapp form (connected to a sp list), I have a text field, changed it to allow values so that makes it a drop down.

Now i have a document library (prequal contracts) added as a source in which _PrequalLookupValue is a text field, so for items property, I set below and it does show me drop down values. 

 

Capture.PNG

 

Only thing I now want to do is, filter based on a managed metadata field called '_RequiredReporting' eq 'Yes' in Prequal Contracts Library. Can someone please help me with the expression for the same, thanks in advance.  

13 REPLIES 13
dariobois
Resolver II
Resolver II

Hi!

 

Did you tryied to do something like this on the "Items" property of the DropDown DataCard ?

 

Filter('Precual Contracts', ThisItem.'_RequiredReporting' = 'Yes')

 

If that doesnt work, share us the name of SP List Connection and the DataType of '_RequiredReporting' field.

 

Regards!

@dariobois  thanks for answering, Yes tried that but did not work.

_requiredreporting is a managed metadata column. SP List name is prequallogreporting

@dariobois tried below but did not work

Capture.PNG

@dmistry 

 

is _RequiredReporting a lookupvalue too?

 

Try some of this:

 

Filter(Choices('Precual Contracts'._PrequalLookupValue), ThisItem._RequiredReporting.Value = "Yes")

 

Filter(Choices('Precual Contracts'._PrequalLookupValue), ThisItem._RequiredReporting.Value = True)

 

Filter(Choices('Precual Contracts'._PrequalLookupValue), ThisItem._RequiredReporting = True)

 

@dariobois thanks but doesnt work, Requiredreporting is managed metadata not a lookup

@dmistry 

 

I'm sorry 😞  but i couldnt understand wich Sharepoint List is linked to that control. Can you show me the original formula of it?

 

By the way, try this, or modify it with your Connection, lists, and properties names.

 

Filter( Choices('Precual Contracts'._PrequalLookupValue), Id in Filter(precalogreporting,_RequiredReporting.Label = "Yes").ID )

 

The idea is to filter the elements of the "LookUpField" when their IDs are in the elements that have the label "Yes" in the managed metadata column of the other list.

 

I hope I've helped.

 

 

 

 

 

@dariobois  thanks so much for helping out. Please check the question description, I added a screenshot there for the control, its linked to Prequal Contracts (document library)'s field called '_PrequalLookupValue', _Requiredreporting is a managed metadata field residing in the same library. I tried what you suggested but does not work

@dariobois  tried below but not getting it to work:

 

Filter(Choices('Precual Contracts'._PrequalLookupValue), ThisItem.ID in Filter('Prequal Contracts',_RequiredReporting.Label = "Yes").ID)

 

Please note _PrequalLookupValue is a lookup field and _RequiredReporting is a managed metadata, both in prequal contracts doc library. 

 

 

@dmistry  Hi Again! 

 

I tried to replicate your scenary. Tell me if im wrong.

 

You have a Sharepoint List called prequallogreporting

dariobois_0-1603641901351.png

with this columns:

 

dariobois_1-1603641933679.png

 

 

And you also have a Document Library Called 'Precual Contracts'

 

dariobois_8-1603643216459.png

 

with this columns.

dariobois_3-1603642089461.png

The managed metadata column contains this "labels"

dariobois_4-1603642097399.png

 

 

Then, in PowerApps you need a dropdown control who shows only the items with a "Yes" value on the _RequiredReporting field, like this:

 

dariobois_5-1603642694047.png

 

You can do that, configuring the items control formula with this:

 

dariobois_6-1603642878226.png

 

Filter(
    Choices(prequallogreporting._PrequalLookupValue),
    Id in Filter(
        'Precual Contracts',
        _RequiredReporting.Label = "Yes"
    ).ID
)

 

 

 

Tell me if that works, or share me all your structure model of sharepoint list, library with columns configuration and example data.

 

 

Regards!

 

 

 

 

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,245)