18
Views
8
Comments
Solved
Generate schedule list
Question

I have to define 6, 8 or 12 hour work shifts by selecting from a drop down menu of a static entity called Shift. I select the shift and enable an input to inform the start time. 

According to the shift and the informed start time, I have to generate the end time of the shift, and I have to generate a list of the next work times within 24 hours of a day. 

Example: I selected the 8 am shift and informed the start time at 8:00 AM. 
As a result, the system should display a list of the following times on the screen: 
8:00 to 16:00 
16:00 to 24:00 
24:00 to 8:00 

How can I do this? 

Solution

I believe I understood, basically it was adding the number of hours per shift to the selected time until 24:00 hours are complete. You can see an example below.


testes_Example_V1.oml

that's exactly it. Thank you very much for your collaboration.

I'm glad I helped, keep up the good work you're doing

Hi João Santos, I attached an example below in the module, tell me if this is what you want.

testes_Example.oml

Actually, it's not quite like that. The list of times must be assembled according to the open input field of the time type. A list that is not saved in an entity must be assembled 

So I didn't notice, it says that "I have to define work shifts of 6, 8 or 12 hours by selecting from a drop-down menu of a static entity" and the list of shifts is built according to the ten selected in the drop-down menu. publish the module and visualize the behavior?

The list of shifts must be presented according to the selected shift and the informed start time.

In other words, the start time plus the number of hours in the shift.

According to these two parameters provided, we must generate a list of possible times within 24 hours.

If I chose the 6h term and the start time is 07:00, the end time will be 13:00.

The next start time will be 13:00 pm and the end time will be 07:00.

The next start time will be 19:00 and the end time will be 01:00.

The next start time will be 01:00 and the end time will be 07:00.

And so complete in 24 hours


Like the example image.


Remembering that this list does not exist in the database.

It must be assembled on the screen according to the data entered

so that it can then be saved in the bank

ISTSHIFTS.jpg

Hi Joao


Why can the list combinations not be placed in the database? 

When you create a normal entity or static entity with all the possibilties and select het correct values from this entity.  That should be relatively easy

The normal entity can be filled with a timer, which runs when publishd.


Best regards,  Marlies 



Solution

I believe I understood, basically it was adding the number of hours per shift to the selected time until 24:00 hours are complete. You can see an example below.


testes_Example_V1.oml

that's exactly it. Thank you very much for your collaboration.

I'm glad I helped, keep up the good work you're doing

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.