cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Incorrect values in LookUp function in gallery

I have a gallery that displays data form SQL Azure Database. on the gallery cards, I have used a lookup function to display some values from another table as well. My issue is that the value returned by the lookup function is sometimes just .... wrong. The lookup criteria is something to the effect of foreign_key = thisitem.id, and it is just really really inconsistent. sometimes every card in the gallery will be correct. other times, the cards will all show the same (incorrect) value, and other times they will just be showing random incorrect values from the related table. 

 

What might be causing this? Why are lookup functions inconsistent like this? When relating foreign keys to primary keys of other tables the result should be consistent, and the expected value is tied to the primary key. Has anyone else experienced this erratic behavior using Lookup functions in galleries? I'd appreciate input here!

 

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Incorrect values in LookUp function in gallery

Hi @dthomson,

As a test, could you ClearCollect() the Lookup table in the OnVisible property of your screen and use that in your gallery instead of the actual sql table. Let me know if that works please.

Highlighted
Community Support
Community Support

Re: Incorrect values in LookUp function in gallery

Hi @dthomson,

 

Can you share a bit more about your issue ?

Can you show me the data structure of two tables ?

 

please check if the field of original table correspond with the field of the reference table.

Please try to re-add data source

Please try to create a collection from SQL table and check if it is solved.

 

Regards,

Eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Incorrect values in LookUp function in gallery

Thank you for your post @dthomson - can you review the above replies and advise if it fixes your problem?

 

@Anonymous

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,557)