cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nate7171
Frequent Visitor

Iterate through dynamic content

I have a requirement:  On an Account change send all fields to another system (ultimately in JSON). 

 

Easy enough to get started, I select:  When a record is updated

 

For testing, I select 'Send an email notification (V3)'

 

I can select any of the Dynamic Content fields individually.  Is there a way to iterate through each dynamic content field and add to a variable (or something like that)? 

 

The requirement is for all fields, meaning in 18 months when another field is added to the entity, it's included in the output without me explicitly adding it.

 

Any assistance or thoughts around a better approach is appreciated.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Nate7171
Frequent Visitor

Thanks for the reply, I appreciate it.

 

What I ended up doing is:

 - Reading the full account record (Get a record) for the one that was updated.

 - Initialized an Object variable (called AccountObject) and placed the body in that variable.  View code looks like this:

 

{
    "inputs": {
        "variables": [
            {
                "name": "AccountObject",
                "type": "object",
                "value": "@triggerOutputs()['body']"
            }
        ]
    }
}

 - Send the message to the queue.

 

View solution in original post

2 REPLIES 2
abm
Super User
Super User

Hi @Nate7171 

 

Edited my earlier reply.

 

Not sure this is possible to do. For each new field is added you need to map dynamically to add the field names in Power Automate.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Nate7171
Frequent Visitor

Thanks for the reply, I appreciate it.

 

What I ended up doing is:

 - Reading the full account record (Get a record) for the one that was updated.

 - Initialized an Object variable (called AccountObject) and placed the body in that variable.  View code looks like this:

 

{
    "inputs": {
        "variables": [
            {
                "name": "AccountObject",
                "type": "object",
                "value": "@triggerOutputs()['body']"
            }
        ]
    }
}

 - Send the message to the queue.

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,021)