cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nightfall
Helper I
Helper I

Populating a variable array with variables

Hi all, and happy new year!

 

I am getting through various compose() the fields from a JSON. 

I want to put some of these fields into an array (fig.1).

At a certain condition, on this array so populated i would then run an apply to each to see if one or more of the fields in the array are equal with a certain value (fig.2).

If I understood correctly, i need to go through a compose(createarray()) in order to set the array variable. However i don't really have a clue on how to do it in a way that it maintains the syntax.

Or should i use again a parse JSON?

I have to admit that I am a bit lost here 😉

 

ADDENDUM: in fig.3 i've put how the array should look like (at least in my mind)

Thank you in advance and best regards,

 

Vittorio

 

array1.jpgarray2.jpgarray3.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @nightfall :

Don't you want to refer to the previous compose action value in a ‘dynamic content’ way?Some thing like :1.JPG

If so,the answer is 'Yes'.You can use this formula:

 

outputs('ComposeActionName')

 

2.JPG

It doesn't seem to have chaged much from before,just use 'expression' instead of 'dynamic content'.But iam afraid there is no other way.

In addition,if my understanding is wrong,please help me point it out.Thank you.

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
nightfall
Helper I
Helper I

An old adage says "the night brings advice", and a corollary to this statement is "never post question in the forum at night".

I used a mix of compose() and "append to array" to create the array the way i wanted, and it works!

Screenshot 2021-01-10 at 09.08.46.png

I have however another question, namely is it possible to write in the compose() the reference to the previous output() in written, without having to select it manually like in the picture?

 

Thank you and best regards,

 

Vittorio

v-bofeng-msft
Community Support
Community Support

Hi @nightfall :

Don't you want to refer to the previous compose action value in a ‘dynamic content’ way?Some thing like :1.JPG

If so,the answer is 'Yes'.You can use this formula:

 

outputs('ComposeActionName')

 

2.JPG

It doesn't seem to have chaged much from before,just use 'expression' instead of 'dynamic content'.But iam afraid there is no other way.

In addition,if my understanding is wrong,please help me point it out.Thank you.

Best Regards,

Bof

 

View solution in original post

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 (4,849)