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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / LookUp function in MyS...
Power Apps
Suggested Answer

LookUp function in MySQL data source failing in UpdateContext

(1) ShareShare
ReportReport
Posted on by 11
Hello! I'm trying to get a record from MySQL table with the following expression:
UpdateContext({VarData: LookUp(svc_PowerApps.Status; Sk = varSk)})
And it returns the following error: "The request was not sent or there was no response from the server. Check your internet connection. Server response: svc_PowerApps.Status failed: null"
 
But this expression works outside the UpdateContext function. Does anyone know why this happens?
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    The issue occurs because UpdateContext() struggles to store complex records returned from connectors like MySQL.
     
    These records may contain metadata or non-serializable structures, causing the operation to fail with a null response.
     
    When used outside UpdateContext(), Power Apps evaluates the query lazily and does not need to store the full record, so it works.
     
    The correct approach is to use Set() to store connector results or extract only the required fields before assigning them to a context variable.
     
    Try below :
     
    Use Set()
    • Set(VarData, LookUp(svc_PowerApps.Status, Sk = varSk))
     
    Instead of storing full record:
     
    UpdateContext({
        VarData: LookUp(svc_PowerApps.Status, Sk = varSk).YourColumnName
    })
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    hi @Ste
     
    If it is a syntax Issue: Power Apps expects commas , as argument separators, not semicolons ;. So the correct syntax should be:
    UpdateContext({VarData: LookUp(svc_PowerApps.Status, Sk = varSk)})
    
    Other than that, there might be two issues:
     
    • Connection or Gateway Issue:
      The Power Apps connector to your MySQL database might be misconfigured, offline, or the on-premises data gateway (if used) is not running or reachable.

    • Service or Table Name Issue:
      The data source name svc_PowerApps.Status might be incorrect or the table Status is not accessible or does not exist in the MySQL database
      .

     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     

    This happens because UpdateContext() sometimes it struggles with storing records coming from external connectors like MySQL.

    Even though your LookUp() work is on its own, wrapping it in UpdateContext() can cause a null or connection error due to how the data is evaluated.

    Set(VarData, LookUp(svc_PowerApps.Status, Sk = varSk))

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard