Showing results for 
Search instead for 
Did you mean: 
Post Prodigy
Post Prodigy

Making an extra ticket when over 8 hours


I am having a ticket system where workers can clock-in during their worktime. This is going to be complex and I am not sure if it will be possible. 


How the app looks like:

You see 2 dropdowns at the start, tijd begin and tijd eind. these are the starting and end times. The textfield tijdtotaal is the formula bases on these 2 dropdowns. It calculates the time between them. 

An employee can work more than 8 hours a day and fill in multiple tickets, because they can work on different projects. 

Whenever tijdtotaal of the day they are wanting to fill in a ticket, is higher than 8, I want it to make a new ticket with the rest of the hours. 

This may be very confusing, it is quite hard to explain. I will give an example now:

On the screenshot above you will see 2 rows (2 tickets) that have been filled in by an employee. You can see the date is  the same of these 2 tickets.

You see the 4,25 and 4,75 which is the column for tijdtotaal. Whenever this column goes over 8, I want to get another ticket and the second ticket should only be going to 8.

So it should like this:

It took -1 hours of the second ticket and created a new ticket with ALL the same details, except, this ticket has the 1 hour that went over the 8 hours. 

Just using this code to send the form away: SubmitForm(EditForm1)

I hope I have explained this well enough, if I didn't, let me know and I will try and explain it better. 


Post Prodigy
Post Prodigy

Anyone able to help? 🙂

Post Prodigy
Post Prodigy

I need help with this 😅

It would be alot easier to do it through flows. Have you tried that approach? You can have a nested approach in flow and if the hours are above > 8 you can re call the same submissions flow original minus -8 hours

Not exactly what I need with that -8. 

If the first ticket is 5 hours and another one gets created with 4 hours, it will look like this now:

5 hours
4 hours

How it needs to look:

5 hours
3 hours
1 hours


You would have to use nested branching in flows as i said.

So quick logic here

TotalHours - LastHour = Except Last
if (ExceptLast < 8 ){ ticket 1 = 8 - exceptlast ; ticket 2 = lasthour - ticket1 )
if(ExceptLast > 8 ){
as per logic

sorry its bit crude but it will give you idea where to start

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (979)