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

SharePoint Calendar - Start Time & End Time

Hello,

 

I'm new with Microsoft Flow & don't really know for sure how to use it (still learning).

 

But right now, I'm trying to use this Microsoft Flow as a event reminder from SharePoint Calendar.  But I got a problem with the result. 

 

In my SharePoint Calendar, I've this dummy records for testing my flow.

Screenshot_4.png

 

When I test my flow, the result is not the same as the actual:

Screenshot_1.png

 

Here is my flow:

Flow1.png

flow 2.1.png

 

Is it possible to fix this issue? please let me know.

 

Thanks.

5 REPLIES 5
v-litu-msft
Community Support
Community Support

Hi @Anonymous,

 

It is caused by the time zone converted by SharePoint, as a workaround, you could use the addHours action to adjust it, for example:

addHours(item()?['StartTime'],-7,'yyyy-MM-ddThh:mm:ssZ')
addHours(item()?['EndTime'],-7,'yyyy-MM-ddThh:mm:ssZ')

 

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.

Anonymous
Not applicable

Hi @v-litu-msft 

 

Thanks for replying to my post. Sorry for late response.

 

I've tried with the code that you provide, but unfortunately I got this kind of error.

 

Error Details:

The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{
  "Title": "@item()?['Title']",
  "Date": "@formatDateTime(item()?['EventDate'], 'ddd MMM d')",
  "Location": "@item()?['Location']",
  "Start Time": "@addHours(item()?['StartTime'],-7,'yyyy-MM-ddThh:mm:ssZ')",
  "End Time": "@addHours(item()?['EndTime'],-7,'yyyy-MM-ddThh:mm:ssZ')"
}' failed: 'The template language function 'addHours' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#addhours for usage details.'.

ErikD_0-1600241207946.png

 

I've put the code for my Start Time & End Time.

ErikD_1-1600241367676.png

 

Thank you.

 

 

Hi @Anonymous,

 

It seems like a properties name incorrect error, you could try to change the expression as below:

addHours(item()?['StartDate'],-7,'yyyy-MM-ddThh:mm:ssZ')
addHours(item()?['EndDate'],-7,'yyyy-MM-ddThh:mm:ssZ')

 If it still not correct, please share an instance of the Get items(please shield personal information).

 

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.

Anonymous
Not applicable

Hi @v-litu-msft 

 

Same error.

 

Error Details:

The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{
  "Title": "@item()?['Title']",
  "Date": "@formatDateTime(item()?['EventDate'], 'ddd MMM d')",
  "Location": "@item()?['Location']",
  "Start Time": "@addHours(item()?['StartDate'],-7,'yyyy-MM-ddThh:mm:ssZ')",
  "End Time": "@addHours(item()?['EndDate'],-7,'yyyy-MM-ddThh:mm:ssZ')"
}' failed: 'The template language function 'addHours' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#addhours for usage details.'.

 

I've put all the new code that You provide for my Start Time column & End Time Column

 

Start Date Code:

ErikD_0-1600265094745.png

End Date Code:

ErikD_1-1600265112208.png

 

Here is my Get Item's Action:

ErikD_2-1600265234901.png

In Filter Query: 

EventDate ge 'utcNow()' and EventDate lt 'addDays(utcNow(),6)'

 

Thanks.

Hi @Anonymous,

 

Could you please make sure every item of the SharePoint list end date and start date are not null?

 

You could show the raw input of the Select action, such as:

Screenshot 2020-09-17 155205.jpg

 

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.

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,577)