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 / Patching global variab...
Power Apps
Answered

Patching global variable with multiple attributes

(0) ShareShare
ReportReport
Posted on by 43

Hi,

 

When I create a global variable with this structure:
Set(glbVar, LookUp(table, ID = x))

It is possible to update only one of the attributes as needed?

 

I've been trying to do something like this

Set(glbVar, Patch(glbVar, {Att1: "bbb"}))

But I get an incompatible with the type of values in other places in the app error.

 

The glbVar is fetched from a table in SQL and I'm trying to avoid referencing controls from other screens by storing the changes in this glbVar. Also, the gblVar record has about 15 columns, with string, number and date types.

 

Thank you,

Daniel

 

Categories:
  • Verified answer
    BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    It sounds like it may be easier to use a Collection instead of the variable. Then you can change any column without effecting the others.

  • danielfsantos Profile Picture
    43 on at

    I believe that's the way to go. 

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard