cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
discgolferusa
New Member

Filtering a dropdown of a lookup list column with a value from another column

Ok, so I've been beating my head against the wall on this and it shouldn't be this difficult.  

 

Say I have a general list of Materials used for construction jobs and their associated info (manufacturer, location, etc) and I have another list that assigns specific materials to be available for a job called Job Materials.  This contains a lookup to the Materials table, a lookup back to the jobs table, and some other information about the job (location, startdate, etc).  

Now I have a power app so that people working the construction job can tell me how much of a material was used for that job.   When entering a record, I want them to select a material but only from the materials that have been associated to the job they are currently editing on.  I want to do this with a job number that i show in the Job Materials list.

I have tried the following and I this does not work.    Filter(Choices('Job Materials'.Materials), Value in Filter('Job Materials', JobNumber = JobNum).Material    

Job Num is a variable i have in the app that stores the currently referenced job number.   When I do this I get an error stating that I can't convert a text value to a "record".   Fine, I get that.   How do I make my dropdown just use the filtered Materials lookup column?   I try and it just never returns anything.   

Thanks in advance!!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @discgolferusa ,

This is because Material column is still a lookup column in your "Job Materials" list. 

You can try lookup() function like below(DataCardValue5 is the control name of my "Job Number" column):

LookUp('Job Materials', 'Job Number and Name:Job Number'.Value=DataCardValue5.Text).Material

Best regards,

Allen

View solution in original post

5 REPLIES 5
v-albai-msft
Microsoft
Microsoft

Hi @discgolferusa ,

I cannot understand your scenario.

Do you have three lists-- Materials list, Job list and Job Materials?

Please provide more screenshots about your SharePoint list(including records and columns) and give me more information based on the data inside your screenshots.

 

Besides, you can refer to below article, check if the requirement is same as yours:

Solved: Filter choices - Power Platform Community (microsoft.com)

Best Regards,

Allen

image.pngimage.pngimage.png

 

So when I pull up Job TJ-90432 I want it to list only the Materials associated to that job in Job Materials.    Right now, it is pulling back all Materials in the Materials table.

Looking at the example you gave a link for, I tried this Filter('Job Materials', 'Job Number and Name:Job Number' = JobNum).Material, but that errors because Materials is a record.  

Hi @discgolferusa ,

This is because Material column is still a lookup column in your "Job Materials" list. 

You can try lookup() function like below(DataCardValue5 is the control name of my "Job Number" column):

LookUp('Job Materials', 'Job Number and Name:Job Number'.Value=DataCardValue5.Text).Material

Best regards,

Allen

View solution in original post

That looks like it did it!  Thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (64,092)