cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
calerof
Advocate II
Advocate II

Send an email if an item is created with a condition in Dataverse

Hello,

I'd like to have a Flow to send an email when a new record is created in a Dataverse table if the field "Downtime Cause" code is = 1.

I start with this:

Flow1.png

 

Then in the Condition I have:

Flow2.png

And finally I use:

Flow_sendEmail.png

 

The flow runs but with no positive condition:

Flow3.png

 

This is my Fact table where I'm checking if an item was created:

Flow_tableProdLog1.pngFlow_tableProdLog2.png

 

And this is the Dimension table with the Codes that I'm checking to compare if it was "1":

Flow_Downtime_Code.pngFlow_Downtime_Code2.png

 

I appreciate your help a lot.

Best regards,

Fernando

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @calerof 

 

What I meant is convert the Dataverse mapping field using int() expression. In your IF condition the left side mapping field. The right side numeric value 1 is fine. Or you could try the right hand side change to string() expression or '1'. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
abm
Super User
Super User

Hi @calerof 

 

What data type is 'Downtime Cause' field? Try use expression int() to convert and compare under IF condition.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

@abm Thank you for your response. 

As you can see in the image above, and I repeat it here, Downtime Cause is text type. 

Flow_expression_result_downtimecause_type.png

 

But the Condition is not returning a positive result before the If branch. I made the change you suggested but doesn't work.

Flow_expression_result_0.pngFlow_expression_result_1.png

 

I appreciate any help on this to make it work.

Thanks,

Fernando

Hi @calerof 

 

What I meant is convert the Dataverse mapping field using int() expression. In your IF condition the left side mapping field. The right side numeric value 1 is fine. Or you could try the right hand side change to string() expression or '1'. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @abm ,
I did and still is not recognizing the condition as true:

Flow_Monday0.pngFlow_Monday1.png

 

There is something in my logic that's not working.

Fernando

 

Hi @calerof 

 

Check the run history and see what values are returned before its hitting the IF condition. Also try the int() expression or string() conversion.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @abm ,

Here I go again, no good results:

Flow1.pngFlow2.pngFlow3.pngFlow4.png

Hi @calerof 

 

Like I mentioned earlier you could try int() to convert the left hand side  IF condition DowntimeCause property dynamic mapping or try string() expression either one should work.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hello @abm ,

Here I go again, base on what try to understand. I can't use int(Donwntime cause) on the left side of Condition.

Flow1.pngFlow2.png

 

I still think the whole Flow doen't have good logic to work, and I can't figure out how to check for this conditon and send an email.

Thanks for any help.

Fernando

@abm ,

Thank you very much for your help Ajith! 

Your support, patience and knowledge are invaluable here. You were so kind to send me a message and take the time to make a Teams meeting to walk me through my Flow to debug and clean it and make it work.

Really appreciate it!

Cheers!

Fernando

 

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,910)