cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kenjoy84
Helper III
Helper III

Set property doesn't apply

Hi guys, I want help with "set property" for an object.

I set a property in for each loop and seems those are set in the property once.

But, when I output that variable after the loop, it seems all property don't be saved and just empty.

Do you know the solution for this? Thank you for your help.

 

Kenjoy84_0-1620934957543.png

Kenjoy84_1-1620935203545.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Got it. We are missing 1 step. Please add SET variable and set the expression to output of Compose. Refer below...

 

PrasadAthalye_0-1620999783193.png

 

Then you can use another compose and set expression as variable and you will see that variable is updated.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

4 REPLIES 4
PrasadAthalye
Community Champion
Community Champion

Manager is an array. Please use following expression...

 

setProperty(variables('PertManager'), 'Manager', createArray(setProperty(variables('PertManager')['Manager'][0], 'Content', 'prasad')))

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye  Thank you, Prasad! I think I can be much closer now. But actually, still output is same.. Do you have any other thoughts? Thank you for your big help!

 

Kenjoy84_0-1620943943280.png

 

Got it. We are missing 1 step. Please add SET variable and set the expression to output of Compose. Refer below...

 

PrasadAthalye_0-1620999783193.png

 

Then you can use another compose and set expression as variable and you will see that variable is updated.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye Thank you for your support. I finally succeeded to make my whole script. Because I am new in Power automate, I am not good at grammar, so your help is very valuable for me. Thank you very much!!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,228)