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 / How to change properti...
Power Automate
Answered

How to change properties of object in bulk?

(0) ShareShare
ReportReport
Posted on by 29

I've set an entity inside a loop with many properties.

entity = {id:1, name:link, date:20201111, note:'',...}

 

I must use the 'setProperty' method to assign a value to each property.
My process now looks like this, which is uncomfortable to read

 

 

for (list) {
// reset entity
set(var(entity), json(id:'',name:'',...))

// set entity
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)


Add a row into a table{
 file:...,
 table:...,
 row:var(entity)
}

.... 
}

 


Is there a way to assign values in bulk?
or you can merge these assignment statements into a single statement?

 

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    Yes, you can just write a compose and define the whole thing in one step. Here is one like it in one of my flows:

    composeObject.PNG

    Does that make sense?

  • xlzs Profile Picture
    29 on at

    Yes, this is what I was hoping for.

    Thank you!


    There may be a problem with my json splicing, I used to use the json function to convert the string to set the value.
    It's horrible to write.😅

    json('{
    "name":"link",
    "age":' + items('getAge') + ',' +
    '"item":' + .....,
    }')
    
    // or use json(concat( ... ))

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard