Earlier I was struggling with getting double triggers from model-driven app but this time my struggle was different. I had Dynamics 365 Customer Insights Journey product public form that was updating Contacts table. I just wanted to have trigger for when row is added to Contacts table having two Yes/No fields with Yes value. But I just did not get the trigger working.

Numeric or boolean values?

triggerOutputs()?['body/boolean3'], false)
triggerOutputs()?['body/boolean3'], '1')
triggerOutputs()?['body/boolean3'], 1)
Choice value numerical values
Choice value numerical values

I chat with M365 Copilot and wondering should the trigger conditions have numerical choice values since the trigger did not work. Sometimes the trigger worked, sometimes not. I tried everything. When turning the flow off and on, the worked for one time but then not. Anyway it turned out that with Yes/No fields you should use true or false, not the numerical value of the choice.

It did not help that I had there multiple values. At start I split them into different rows like picture below which cause having Power Automate new designer giving me error why I first place start to test these numeric values of choices.

The power flow's logic app flow template was invalid. The template condition expression 'equals(triggerOutputs()?['body/boolean3'], true)' at line 'true' and column '3990' is not valid template language expression.
Trigger conditions split into different rows in Power Automate
Trigger conditions split into different rows in Power Automate

Add or Update?

When finally understood that there was nothing wrong with true or false I realized that my flow is triggering only change type Add. When turning the flow on and off, it triggered once when adding the form and then stopped working not matter how many forms I was updating.

Multiple trigger conditions with Dataverse Add or Modified trigger
Multiple trigger conditions with Dataverse Add or Modified trigger

Then I realized that it is actually triggering Update change type as well. It updates some contact rows since I used the same test data once in a while. How stupid I felt – on the other hand I figured it out! It created new row in Contact table triggering Add but when I used the same data it triggered Update.

But how to know when to do the functionality in my flow or not?

Updating boolean3 field to Yes in the end of flow
Updating boolean3 field to Yes

Create Yes/No field and mark it’s default value as No. In my example it is this boolean3. Add it to your trigger conditions. When you have done your Power Automate functionality for your row, update the value for this field to be Yes. Then you avoid the never ending circular loop and you can handle both Add or Update condition types. Since you want to do your functionality with Power Automate only once to your row.

@and(and(equals(triggerOutputs()?['body/boolean1'], true), equals(triggerOutputs()?['body/boolean2'], true)),equals(triggerOutputs()?['body/boolean3'], false))

Off course if I would know that boolean1 and boolean2 will be always true when the Add type is triggered, I would not need boolean3. If the row is added with those boolean as false and later on updated to true, then I need my Power Automate to trigger to do my functionality – and do it only once.