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 / Trigger expression on ...
Power Automate
Unanswered

Trigger expression on when a record is created to look at parent entity column value

(0) ShareShare
ReportReport
Posted on by

Hi, I don't know if this is possible but I am looking to set a trigger expression on when a record is created so that the flow will only run /execute when a field in its parent entity is a certain value.

I've done the usual set up of creating a compose action to add the column I want in - but to pick up that column I've had to add an additional get Records action called 'Get Starter Leaver records' that points at the parent entity. This action is added after 'When a record is created' action because the column I want to target in the compose action is in the parent entity. This is where the issue arises.

 

 

So in my flow I have the following action  (in order listed)

 

When a record is created

Get Starter Leaver Records

Compose

 

 

In the 'When a record is created action' I've added the following trigger  expression:

@equals(triggerBody('Get_Starter_Leaver_Records')?['crd19_sendappapproved'],true) 

 

As you can see, the sendapproved field is targeted in the get records action called 'Get_Starter_Leaver_Records' - that I added after the 'When a record is created' action in the flow.

 

But it doesn't work because the code in the compose action is now  @body and not @triggerBody:

 

"inputs": "@body('Get_Starter_Leaver_Records')?['crd19_sendappapproved']"
 
I believe this is due to the compose action not being directly under the 'When a record is created' action, which it can't be as I need the aforementioned get records action to get the parent entity column /value.
Is there a way round this?
 
 

 

 

 

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    If you search dynamic content in the right bar for "Send App Approved", it will appear two dynamic content to select, for example:

    Annotation 2020-01-08 102934.png

     

    If it not work, you can input the following expression directly:

    @triggerBody()?['crd19_sendappapproved']

     

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

  • Community Power Platform Member Profile Picture
    on at

    Hi v-lits-msft I added the expression 

     

    @triggerbody()?['crd19_sendappapproved']

     

    and updated the trigger as:

     

     @equals(triggerbody()?['crd19_sendappapproved'],true)  - the field is a two option type - but it still didn't work.

     

    I even tried the full path to the parent entity:

    In compose Action:

     

    @triggerbody('Get_Starter_Leaver_Records')?['crd19_sendappapproved'] 

     

    And then in the trigger:

     

    @equals(triggerBody('Get_Starter_Leaver_Records')?['crd19_sendappapproved'],true)

     

    Still no joy. Any ideas?

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard