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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,292)