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

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
Super User
Super User

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

View solution in original post

@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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,329)