cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
craigmk1987
Helper II
Helper II

Help with dates and arrays

Hello,

 

I need some help with a flow that I am building that delivers a weekly digest email to my team members about their booked leave. As teams doesn't have a leave allocation counter, I figure I can create an email that tells them what leave they have booked, put in their manual allowance and figure out how to count the number of days of holiday so that it shows a counter for them. 

 

I'm getting stuck on using dates to convert dates to a user date rather than a programmed output date which is not very friendly. 

 

My flow looks as follows:

 

craigmk1987_1-1602927154173.png

And

craigmk1987_2-1602927253232.png

And

craigmk1987_3-1602927333363.png

And then:

craigmk1987_4-1602927387579.png

And then:

craigmk1987_5-1602927427453.png

Which gives me the following output:

craigmk1987_6-1602927461109.png

What I'm hoping for is each holiday as a line, with it's start and end date rather than the same holiday repeating itself as it is above. I hope that's clear and any help is much appreciated.

 

Craig

1 ACCEPTED SOLUTION

Accepted Solutions
craigmk1987
Helper II
Helper II

I found the solution on another post, rather than having a convert function for each, I formatted the date using the following options in the create html table:

 

Start date:

formatDateTime(item()?['sharedTimeOff']?['startDateTime'], 'dd-MM-yyyy')

End date: 

formatDateTime(item()?['sharedTimeOff']?['endDateTime'], 'dd-MM-yyyy')
 
For anyone who wants to replicate. 

View solution in original post

2 REPLIES 2
craigmk1987
Helper II
Helper II

I found the solution on another post, rather than having a convert function for each, I formatted the date using the following options in the create html table:

 

Start date:

formatDateTime(item()?['sharedTimeOff']?['startDateTime'], 'dd-MM-yyyy')

End date: 

formatDateTime(item()?['sharedTimeOff']?['endDateTime'], 'dd-MM-yyyy')
 
For anyone who wants to replicate. 

View solution in original post

Hi craigmk1987,

 

Thanks for sharing the solution.

 

Regards,

JAvier

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (30,936)