cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Created Date vs Modified Date

 

Hello, what could be wrong with my condition? I am using the trigger - When an item is created of modified, and I added condition so I can get 2 different emails (1 for item created and 1 for item modified).

 

I am comparing Created and Modified, however, I keep on getting the email for item modified event if I just created an item.

 

PA.JPG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

 

Add A compose data operation with the below expression:

div(div(mul(sub(ticks(triggerOutputs()?['body/Modified']),ticks(triggerOutputs()?['body/Created'])),100),1000000000),60)

In your condition check if the output of the compose operation is greater than 0 then this means this s modified otherwise if the output = 0 then it is on creation

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

Update Item Sharepoint you need to pass the Id of the list from your trigger and save the event id in the calendar new ID

 

Mira_Ghaly_0-1616663335161.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

8 REPLIES 8
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

 

Add A compose data operation with the below expression:

div(div(mul(sub(ticks(triggerOutputs()?['body/Modified']),ticks(triggerOutputs()?['body/Created'])),100),1000000000),60)

In your condition check if the output of the compose operation is greater than 0 then this means this s modified otherwise if the output = 0 then it is on creation

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

Mira_Ghaly_0-1616661536481.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

Thank you so much Mira! 🙂 It workssss 😀😀

 

Sorry, I have follow up question, I am also trying to Create/Update my outlook calendar to sync with the Sharepoint Calendar, I added a column in sharepoint 'Calendar new ID', I'm trying to store the ID of newly created event there, so I can pass it to Update event(v4). I'm not sure how to do it.. Is this correct?

 

PA 2.JPG

 

Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

Update Item Sharepoint you need to pass the Id of the list from your trigger and save the event id in the calendar new ID

 

Mira_Ghaly_0-1616663335161.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

I got this error when I try to test:

The 'inputs.parameters' of workflow operation 'Update_event_(V4)' of type 'OpenApiConnection' is not valid. Error details: The resolved string values for the following parameters are invalid, they may not be null or empty: 'id'

 

 

PA 4.JPG

Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

can you add a compose data operation before this step and add the field Calender new ID just for troubleshooting

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

Hi Mira, it's actually working now, thanks!! 🙂 But when I create an item, it will trigger the Create Email, after less than a minute, it will also trigger the Modified email even if I don't change anything on the event. Is it because of the Update item action after Create event (V4)? 🙄

Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous 

yes unfortunately

but if you want your update to be triggered on specific condition only you can adjust you trigger filter conditions so on your Trigger click settings and click add Trigger Condition

Mira_Ghaly_0-1616668945459.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,534)