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 / It is possible to upda...
Power Apps
Answered

It is possible to update a Table that contains variable(s)?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,

 

Current behavior

 

From the main/home screen, some variable are define:

 

Set(myVar, {});
Set(myTable, Table({FirstName: "John", LastName: "Snow"},myVar));

 

 

It works as expected. Now, in another screen (displayScreen), the myVar is updated:

 

 

Set(myVar, {FirstName: "Daenerys", LastName: "Targaryen"});

 

 

  • If myVar is displayed on the screen (displayScreen), the value is correct
  • If myTable is displayed on the screen (displayScreen), Only "John Snow" is visible (the updated variable was not taken into account in the Table

Note: to ensure that a variable can be stored into a Table, a test was performed with myVar with an object, and it works.

 

Expected behavior

When the variable is updated, the Table that contains this variable should be updated too (contains the latest values)

 

Something is missing? It is another solution to do that?

 

Thank you in advanced

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Hi @Anonymous ,

    If you are going to use a Table, do a Collection instead of a Variable - you can update that with a Patch.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz,

     

    Thank you really much for your answer.

    Unfortunately, that does not really work that is expected.

    The main idea of the variable, was to keep an order of object (because behind, a component with 'slots' is used).

     

    By the way, your answer is accepted because you implicitly answer the question that a Table can hardly used to manage dynamic data.

    The solution to fix the issue is finally:

    • use collection (thx @WarrenBelz ) on the main screen
    • Init collect with data (ClearCollect(collectVariable, {...},{...}). The data have an additional property "Order" (ex: {Order: 1, FirstName: "...", LastName: "..."} )
    • on the other screen, use Collect(collectVariable, {Order: 3, FirstName: "...", LastName: "..."})
    • On the component, a Sort(myCollect, Order) is used to keep the order and display the data

     

    Hooping this can help someone else 🙂

  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Hi @Anonymous ,

    This blog of mine is for a different outcome, but it shows how to add sequential numbers to a collection or directly to a gallery Items.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • askondo Profile Picture
    Microsoft Employee on at

    @WarrenBelz Your blog is very informative. Thank you for always responding to the forum.

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

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard