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 Automate / Updating in memory JSO...
Power Automate
Unanswered

Updating in memory JSON Object properties in Flow

(0) ShareShare
ReportReport
Posted on by 107

Hello together

I need to analyze data with a Power Automate Flow. The flow will be very extensive. To be able to manage intermediate results per analyzed record in the flow, I thought about defining a JSON object as follows:

 

{
 "TotalTasks": 0,
 "OcrLabels": 0,
 "NotValidated": 0,
 "NOk": 0,
 "UTD": 0,
 "Ok": 0,
 "OverwriteUser": 0,
 "NotAvailableUser": 0,
 "OkSupervisor": 0
}

 

Above JSON Object is stored in a Variable called 'Validation'.

Now I want to access individual properties of the object at any point in the flow and, for example, increase the value by +1 or subtract -1, summarize intermediate some values, and so on... For increasing a property value by 1 I currently use the following line in a Compose Task:

 

setProperty(variables('Validation'), 'TotalTasks', add(variables('Validation')['TotalTasks'], 1))

 

In order for the value to be effectively stored in the object, I have to append a Set Variable Task after each Compose Task. If I want to update two values, I cannot append a Set Variable Task after the second Compose Task. No, I have to do a Set Variable directly after each Compose Task. This makes the flow extremely slow.

Is there a better solution to cache and edit data in the flow without having to store it in a DB or SharePoint or File?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Aedu ,

     

    Because a variable do not support referencing itself at the same time in 'Set', I'm afraid we can only add a 'Compose' before the 'Set'. In addition, you can consider replacing object variables with multiple int variables, and then using increase and decrease actions.

     

    Best Regards,

    Bof

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard