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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Apply_to_each referenc...
Power Automate
Unanswered

Apply_to_each referenced by inputs in Compose action are not defined in the template

(0) ShareShare
ReportReport
Posted on by 29

Am creating a simple flow to populate an excel file with the details of people that have access to a PowerApp. I want their email address, their roleName and the createdOn date.

 

DaveMack_0-1707738808377.png

 

Above image shows the flow structure and it works fine for Email and roleName and the excel file is updated correctly, so the Compose and Compose 2 steps work okay.

However, because createdOn doesn't appear as an option in the Get App Role Assignments list, I tried using a dynamic expression for Compose 3:

 

 

items('Apply_to_each')?['properties/createdOn']

 

 

But saving throws this error:

 

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Compose_3' are not defined in the template.'.'.

 

This is a copy of the first record of the JSON for the array so you can see the items:

 

DaveMack_1-1707739211997.png

 

So createdOn is there within the properties part, but for some reason I can't access it like I can others. I can even get the scope and the notifyShareTargetOption, but not the createdOn or createdBy.


Am I missing something here? Anyone explain how I can extract the createdOn date ?

 

Thanks

 

 

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,858 Most Valuable Professional on at

    Hi @DaveMack 

     

    Correction, Ofcourse it is within the properties so like @ManishSolanki  mentioned use that. I clearly didn't looked into it. 😂

     

    items('Apply_to_each')?[properties]?['createdOn']

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @DaveMack 

     

    Pls try this:

    items('Apply_to_each')?['properties']?['createdOn']

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • DaveMack Profile Picture
    29 on at

    Thanks but have tried below and get same error message

    items('Apply_to_each')?['properties']?['createdOn']

     

  • Verified answer
    DaveMack Profile Picture
    29 on at

    I'm an idiot !

     

    I overlooked the correct name of the Apply_to_each step. In my example it should have been:

     

    items('Apply_to_each_2')?['properties/createdOn'] 

    and not 

    items('Apply_to_each')?['properties/createdOn'] 

     

    Thanks for the help though 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard