cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AMR80
Helper I
Helper I

Compose Date from a Get items Step in Flow

I have a Flow that triggers when an item is created in a SharePoint list (Shop Attendance). If the column "Delay90Days" value is "yes" it gets items from another SharePoint list (Employee Roster) to find their start date. It then formats their Start Date to add 90 days. Once it grabs the date 90 days from their start date, it delays until then and updates the originally created item to give them vacation time (on the Shop Attendance site). I am getting an error on my Compose step where the formatDateTime expression is. 

 

Error: "The template validation failed: 'The repetition action(s) 'Get items' referenced by 'inputs' in action 'StartDatePlus90' are not defined in the template.'."

 

Here is the Expression I'm using: formatDateTime(addDays(items('Get items')?['Start%5Fx0020%5FDate']),90,'yyyy-MM-dd')
I think maybe the error is telling me I have this part wrong: "items('Get items')?['Start%5Fxoo20%5FDate'])"??

 

If anyone knows how I should update this expression or maybe another way to accomplish the same goal, I'd appreciate the help. 
Screenshot of the Flow attached.FlowSnapshot.jpg

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I ended up using this expression: 

formatDateTime(addDays(body('Get_item')?['Start_x0020_Date']),90,'yyyy-MM-dd')
 
But I had to create a variable for the SharePoint ID of the Roster item I was isolating to be able to use this part of the formula: "body('Get_item')?['Start_x0020_Date']". Attached is a snapshot of the Flow as it sits now. FINAL.jpg

View solution in original post

3 REPLIES 3
RobElliott
Super User
Super User

@AMR80 I think your Start%5Fxoo20%5FDate should be Start_x0020_Date

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

@RobElliott  It took it, but I still got the same error when trying to save my Flow. Pic attached.FlowSnapshot2.jpg

I ended up using this expression: 

formatDateTime(addDays(body('Get_item')?['Start_x0020_Date']),90,'yyyy-MM-dd')
 
But I had to create a variable for the SharePoint ID of the Roster item I was isolating to be able to use this part of the formula: "body('Get_item')?['Start_x0020_Date']". Attached is a snapshot of the Flow as it sits now. FINAL.jpg

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (26,151)