web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Systematics for refere...
Power Automate
Answered

Systematics for referencing properties

(0) ShareShare
ReportReport
Posted on by 9

Why is it, that retrieving a property of the triggerBody object requires a questionmark - triggerBody()?['SomeValue'- while getting a property of the current loop object - items('Apply_to_each')['SomeValue'] - goes without it?

EDIT: Just was pointed to the answer in another topic - understood. Yet the following questions are still valid:

 

Is there a tutorial or documentation or online course out there explaining basic concepts like these from scratch? I am tired to work my way through things like these by doing countless google searches...

EDIT: Found the Azure Docs but that's way to dry. I would need some examples or use cases.

 

Also I am haunted by things like "wrapper object for batch trigger response" or simply "value - A list of the response objects" which appear as dynamic content when I start building an expression 😨. Would I ever use these? And if - how?

 

The screenshots show OnNewEmailV3 with SendEmailV2 in the second step (german).

wmelonMan_0-1653130549796.png  

wmelonMan_1-1653130653586.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    12,046 Super User 2026 Season 1 on at

    Hi @wmelonMan ,

     

    I've seen articles and training courses use different JSON "notations". New developers (including myself) assumed that the different notations were the same, it was just a matter of preference. The writers or trainers do not elaborate any further - perhaps they think it may be too confusing for a beginner?  

     

    May be the following examples will help.

     

    Example 1

    Snag_f8b9476.png

     

    variables('varData')?['name'] ➡️ C-3PO
    variables('varData')['name'] ➡️ C-3PO
    variables('varData').name  ➡️ C-3PO

     

    Example 2: variables('varData')?['name']

    The name property is missing from the data:

    Snag_f9a7d7a.png

    variables('varData')?['name'] returns an empty value:

    Snag_f9517b3.png

    The flow does not produce an error and the flow continues.  Your flow may need some logic to handle the empty value (e.g. if it is a value, like age or currency).

     

    Example 3: variables('varData')['name']

    The name property is missing from the data:

    Snag_f98b3d6.png

    variables('varData')['name'] ➡️Flow stops with anError
    variables('varData').name ➡️ Flow stops with anError

     

    Snag_f92b068.png

     

    However, the error message is actually very useful and tells us that the name property is missing from the data:

    Snag_fb64868.png

    'The template language expression 'variables('varData')['name']' cannot be evaluated because property 'name' doesn't exist, available properties are 'height, mass'. 

     

    So most of the time in your flows you would use the notation variables('varData')?['name'] .

     

    However, as we have seen there are times when the other notation (variables('varData')['name']) can useful in testing and debugging a flow. You may want to generate an error and stop the flow so that you can identify the error and correct it. You may have mistyped a property or the property may be missing and you are seeing empty data values in your flow.  You may need some additional logic to handle the empty or missing values or fix the source data.

     

    I know that @DamoBird365 is quite an expert in this area.

     

    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

     

     

  • wmelonMan Profile Picture
    9 on at

    @ekarim2020 , thanks a lot for the detailed explanation. That made it very clear to me!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard