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 / UpdateContext returnin...
Power Apps
Unanswered

UpdateContext returning incorrect results. Is this a bug?

(1) ShareShare
ReportReport
Posted on by 19
I am getting a ProjectID number from the database.  The code is being executed in the OnVisible event when I open a screen.
I am used both the UpdateContext and Set functions to test each.  But I noticed they returned different results.  The UpdateContext  function
returned a record, which is incorrect, while the Set function returned a number, which is correct.  Is there a bug in the UpdateContext function?
 
I am using UpdateContext to return a single ProjectID value. from a database table.  For some reason it is returning a record. 
 
 
 
If I use Set, a correct number is returned.
 
 
 
I have the same question (0)
  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at
    Firstly UpdateContext and Set are two different Variable types - the first only exists on the screen on which it was set (you can have the same Variable name on different screens with completely different value and types) and the second is Global across all screens. It is also important to not that if you have one of each type with the same name, then the Context Variable will take precedent. Can you please post your code in Text as your images are not coming through for me.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard