cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexwong
Level: Power Up

Dynamic Content not showing up in Expression

As of 9/23/2019, Flow as a problem with Dynamic Content and Expression. There are 2 issues:

 

  1. After using a Parse JSON action, which parsed a JSON array of properties. Since it is an array, I am trying to perform some action per array of properties, so I am inside a "Apply to each" action. Each array contains some properties, which should be available as dynamic fields for subsequent actions. However, when trying to use the dynamic fields in an expression, which generally you go to the Expression tab, and start with one, such as if(), when trying to go back to Dynamic content and select one of these JSON properites fields, they are NOT available for selection.
  2. This is the SAME situation as above, but manifest as a different problem. B/c the dynamic content is not available for selection inside an Expression, I went and use the dynamic content directly as a field, then proceed to "select/copy/paste" into the Expression for use instead, but continue to get Invalid Expression when I know for sure the expression is good.

I have contacted support already, and have someone worked with me from Microsoft for this (this seems to be the ticket number if anyone interested: 119091921001364). However, the response is a workaround and product team is claiming this as working-as-designed.

 

The workaround for #1, is exactly what I did in #2. The workaround for #2, is to remove specific character after the the field as been copied. Example of using the copy/paste field in an equals function:

equals(@items('Apply_to_each')['approval'],'')

When using in express, above would result in error, I am told to have to remove the @ sign and any curly braces, since this field copy/paste did not have curly braces, I will need to use Expression like this:

equals(items('Apply_to_each')['approval'],'')

 

I understand this is a workaround. But what I do not understand is (at least in my opinion), this is a buggy situation where we (user) require workaround to work in Flow, it should be consider a bug rather than "design behavior"

 

Let me know what you think.

2 REPLIES 2
Community Support Team
Community Support Team

Re: Dynamic Content not showing up in Expression

Hi @alexwong ,

 

For the first issue, you could add a Compose action to save the JSON properites Dynamic content first, then you could use the Compose expression in the Expression tab.

For the second issue, yes, you should delete the "@" in the expression that you mentioned, and it is not a bug, it is just a design in microsoft flow.

 

The expression items('Apply_to_each')['approval']  would be formated to @items('Apply_to_each')['approval'] automatically when it is used in microsoft flow to get the value.

The expression equals(items('Apply_to_each')['approval'],'')  would be formated to @equalsitems('Apply_to_each')['approval'],'') automatically when it is used in microsoft flow to get the value.

 

If you use the expression equals(@items('Apply_to_each')['approval'],'') , then it would be formated to @equals(@items('Apply_to_each')['approval'],'') so the expression would run failed.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

alexwong
Level: Power Up

Re: Dynamic Content not showing up in Expression

Hi, thanks for the reply.

 

For #1:

I do not understand the need for adding an additional "compose" action on specific dynamic content when that dynamic content should have been available. The fact that the dynamic content is not available on expression use (while if NOT expression can be used) is the bug that you are not accepting it as such. I appreciate that you are giving me a workaround by using compose action to "re-expose" the field again, but i do not understand why this wouldn't be a bug that need fixing so workaround is not needed.

 

For #2:

I understand that's how "copy" works now. However, I have created quite a few Flows previously and that utilize "copy" and "paste" and did not need to remove specific characters (my previous Flow also make use of Parse JSON and then "Apply to each" actions). So I am just wonder what new feature of Flow that was recently introduced that caused a regression.

 

Alex

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 180 members 6,395 guests
Please welcome our newest community members: