cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShawnKeeneTF
Advocate I
Advocate I

Dynamic Content Code Changes When Editing

I have a flow where some early steps perform string operations:

 

  1. Find Space (outputs the numerical position of the first "space" found in a user's Display Name)
  2. Substring (uses the position from the prior step and outputs the substring containing just the user's first name)

 

I later use the substring output in an email message. It shows as

 

outputs('FirstName_Substring')?['body']

 

 

and it works fine when I save and test my flow. It will continue working fine for all flow runs until I ever click "Edit" on this flow again. As soon as it opens for editing, the email message shows this field as:

 

body('FirstName_Substring')?['body']

 

 

"Body" instead of "Output".  If I save it after it's transformed itself, the flow will fail until I delete it from the email and insert it again using the Dynamic content list to choose the "Substring" step.

 

In short: it works when first inserted and saved, but if you edit the Flow later it changes (even if you don't open/look at that code, just opening the flow for editing causes it to change).

 

example.png

3 REPLIES 3
a_hansen
Helper I
Helper I

Perhaps you could try using Compose on that substring, then inserting that output into your email?

Can you guide me a little more on that usage?  I thought I could give it a go but I must be doing it wrong.

I added a compose step immediately after my substring step, using the output of the substring as the input for Compose.

 

But when I go to the later step to edit the email body, "compose" isn't in the list of available fields to add into the email text.

 

Here's a screen snip so far:

 

substring_flow.png

Any other ideas?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,380)