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 / Update a Record in Can...
Power Apps
Answered

Update a Record in Canvas App

(0) ShareShare
ReportReport
Posted on by 765 Super User 2024 Season 1

I have a variable define as follows:

Set(
 gblAppData,
 {
 Id: 1,
 AppId: 1,
 Version: "1.0.0.0",
 TestingMode: true,
 IsAdmin: false,
 IsOwner: false,
 IsAdminOwner: false,
 User: User(),
 LatestVersion: "0.1.0.0,
 ForceUpgrade: false
 }
);

I would like to update a property in this variable but all the functions take collections or tables. Is there any way to directly update a property in this variable?

 

Thank you.

Categories:
I have the same question (0)
  • Static Profile Picture
    118 on at

    Hi @sperry1625 ,

     

    Can you try this for ex: Set( gblAppData, Patch( CurrentItem, {IsAdminOwner: true} ) )

  • Verified answer
    Devvj Profile Picture
    1,132 Super User 2024 Season 1 on at

    Hi,
    Try patching the variable, inside the Set() function, since the patch return the results

     

    Set(gblAppData, Patch(gblAppData,{IsOwner:true}))

     

  • sperry1625 Profile Picture
    765 Super User 2024 Season 1 on at

    Tried that. I get the following errors:

     

    sperry1625_0-1689261324709.png

     Set(
     gblAppData,
     Patch(
     gblAppData,
     {
     IsAdmin: true
     }
     )
    )

    The "Name isn't valid" error is for gblAppData in the Patch() call. It has no issues with gblAppData in the Set() call.

     

    Any other ideas?

     

  • sperry1625 Profile Picture
    765 Super User 2024 Season 1 on at

    Ok, strange.  I closed the Canvas Studio and reloaded the app. The errors went away.

     

    So strange.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard