cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rommeldvo
Advocate II
Advocate II

How to use a Lookup column with Filter according to Field Values

Good day. 

 

I have a powerapp which is connected to a customlist to enter a mobile device survey, wherein one of the field is a lookup column, which points to another custom list that has all the mobile devices for selection. 

 

Here is my main survey list with the lookup column. 

 

 

Main list with lookup column.PNG

 

 

 

And here is the list where the lookup column fetches the data, which is the Title Field. 

 

mobile devices list.PNG

 

Now, im my powerapp. I have created a custom card, where i set the source of the dropdown control  to the Mobile Devices list using the lookup function, so that i can display values with IsAvailable field = true

 

datacard lookup formula.PNG

 

and here is the Custom Datacard. but the problem is that, the dropdown is always showing the value LG G6, in which the IsAvailable = false

 

datacard value wrong.PNG

 

mobile devices list.PNG

 

Now, if i set it to false, it will display LG G6. but i think the formula isn't working properly if im getting the data where IsAvailable = true, it seems that its only returning the latest data.  As i test it again, by adding a new Phone. 

 

mobile devices list with new phone.PNG

 

but wierd thing, is that , it is still showing LG G6 with IsAvailable = No, 

 

datacard value wrong.PNG

 

Is this a bug on using the LookUp function? 

what is the best way that i can this to work correctly. 

 

Thank you very much for the help and support. 

 

 

1 REPLY 1
v-monli-msft
Community Support
Community Support

Hi @rommeldvo,

 

So you said that you have added a custom data card inside a DisplayForm, I assume. What is the data source of this Form? Is it also  mobile devices list? Also, what is the column type of "IsAvailable"? Is it a Yes/No column?

 

In addition, the LookUp function only finds the first record in a table that satisfies a formula. We use LookUp to find a single record that matches one or more criteria. This is the reason why you only got one result in the dropdown control.

 

Or if you are trying to add this dropdown in the EditForm of Survey list, and submit it to Survey list, then I'm afaid that this cannot be done so far.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,272)