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?