web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issues with using SQL ...
Power Apps
Unanswered

Issues with using SQL Tables and LOOKUP in PowerApps Gallery

(0) ShareShare
ReportReport
Posted on by 65

Hi Community, 

this is my first time trying to combine SQL Tables in PowerApps and I came across a strange "phenomena":

 

The idea is that the App would list Data from the "DowntimeSlaveData Table" while performing a LOOKUP of the "SlaveID" in the second Table ("WermaMaschinen") and then display the "WermaDescription" in the Gallery.

 

When testing the App I realized that it only works for SlaveID's < 11, for all Slave IDs >= 11 it gives me "no data to display"

 

Please review the attached Screenshots:

  • 1 - PowerApp Gallery SlaveID greater 11: shows the issue ("keine Daten" = "no data")
  • 2 - DowntimeSlaveData Table: shows the structure of the Table incl. the Slave ID's (where you see that SlaveIDs > "11" exist, e.g. "24" as an example)
  • 3 - WermaMachineIDs: shows the additional information needed for the Lookup ("Decription") and you will see that also here SlaveID's > 11 exist. E.g. the Slave_ID "24" should give the result "147 Deco 20"
  • 4 - Power App Gallery Slave ID smaller 11: shows that the exact same filtering code receives correct results for SlaveIDs < 11

As I said its my first kind of App interfacing directly with multiple SQL table so the issue might be on my side. I appreciate any help to find the bug

Thank you very much

Cheers,

Oli

 

Categories:
I have the same question (0)
  • Oliclusive Profile Picture
    65 on at

     the last Screenshot

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @Oliclusive ,

     

    How many records are there in DowntimeSlaveData Table?

    It looks like a delegation issue, since the Addcolumns function is not delegable, so it can only retrieve back 500 records (you can increase the threshold to 2000). 

     

    If you only want to show the related Werma_Description in DowntimeSlaveData Gallery, there is no need to use AddColumns function  to save it to the backend source, just show it in the Label inside the gallery, please try this:

    Set the Gallery.Items property: 

    Filter('[dbo].[Werma_DowntimeSlaveData]'; slaveId>11)

    Add a Label in the gallery, set Text property:

    LookUp('[dbo].[Werma_Maschinen]'; Slave_ID= ThisItem.slaveId).Werma_Description

     Hope this helps.

    Sik

  • Verified answer
    timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @Oliclusive 

    The other thing I would check is whether or not the data type of slaveId is definitely numeric in your SQL table.

    If the data type of slaveId is text, that would explain why the > operator doesn't return expected results

  • Oliclusive Profile Picture
    65 on at

    Hi - yes I checked it's numeric

  • Verified answer
    Oliclusive Profile Picture
    65 on at

    Hi @v-siky-msft , your gut feeling was right, in relation to the delegation issue! As I need the Addcolumn statement now I filtered the raw data first in an SQL view and by that reduced the lines imported drastically before carrying out the Addcolumns statement. Now everything works fine. THis is awesome - thank you :))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard