I would like to be able to keep track of quantities that were produced during Overtime Hours.
My initial thought was to have a GI for move transaction history with a checkbox that would check if it was made during these overtime hours. This has proven to be quite the task and I just can’t get the correct transactions checked.
I then thought I could create a Work Calendar and pull it in as a Data Source to compare with the times that the transactions occurred at. For this I had to create a GI that pulled the time information from the work calendar which made it display as a formula when it was used as a data source. However, I get an error when viewing the inquiry that these items “can’t be bound” (whatever that means).
My new thought would be to create a business event that would trigger when a move transaction happened during Overtime Hours and it would automatically update an Attribute within the produced item displaying OT. This way I could filter by the attribute. However this would also require the system recognizing time enough to create conditions in the GI that this business event would pull from.
Overtime Hours:
Mon-Thurs 1:30 AM - 4:00 AM
Friday 1:30 AM-11:59 PM
Sat-Sun 12:00 AM - 11:59 PM
Here is what I had that would hopefully check the box if it was on “this specific day” and between these two calendar times. This gets the unbound error.
=IIf(((DayOfWeek([AMBatch.CreatedDateTime])=1) AND ([AMBatch.CreatedDateTime]>= [OTCalendar.CSCalendar_Formula56fd3ca1b78246d6abefd6d1b84c8c1a] AND [AMBatch.CreatedDateTime]<= [OTCalendar.CSCalendar_Formulac58c8a1ef3914d7a9aa068240afbf499])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=2) AND ([AMBatch.CreatedDateTime]>= [OTCalendar.CSCalendar_Formula641bd672826d418ebeaed20ad7a230e9] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formula92019c63a8aa49c4aa8c049644c065ec])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=3) AND ([AMBatch.CreatedDateTime]>=[OTCalendar.CSCalendar_Formula69b7df004ca6463fa7216994c739cf83] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formulaaa320e5236374f83b2409380e52fafb2])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=4) AND ([AMBatch.CreatedDateTime]>=[OTCalendar.CSCalendar_Formula173c76126aea4b60945d469329e87e67] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formula07ab10862c26463799d9ff45fd939933])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=5) AND ([AMBatch.CreatedDateTime]>=[OTCalendar.CSCalendar_Formulac9c7c290a0914e01b4c01b3ee5ee569a] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formula2252b4429b614a0ca344ec1e3a09a40e])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=6) AND ([AMBatch.CreatedDateTime]>=[OTCalendar.CSCalendar_Formula116899d0dd8c495faf42fab38df01f3a] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formulaf57d0b3ba50f46dc8d6fab1c0e285a55])) OR ((DayOfWeek([AMBatch.CreatedDateTime])=7) AND ([AMBatch.CreatedDateTime]>=[OTCalendar.CSCalendar_Formula5efd7ea7c96d4a68b75c83c74fe729bd] AND [AMBatch.CreatedDateTime]<=[OTCalendar.CSCalendar_Formula91ade4b6fb984e179245f16ee5fc0169])), TRUE, FALSE )
Since this cannot be bound, and I cannot see if it works, I substituted each calendar time with an actual time instead.
=IIf(((DayOfWeek([AMBatch.CreatedDateTime])=1) AND ([AMBatch.CreatedDateTime]>= '12:00:00 AM' AND [AMBatch.CreatedDateTime]<= '11:59:59 PM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=2) AND ([AMBatch.CreatedDateTime]>= '1:30:00 AM' AND [AMBatch.CreatedDateTime]<= '4:00:00 AM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=3) AND ([AMBatch.CreatedDateTime]>= '1:30:00 AM' AND [AMBatch.CreatedDateTime]<= '4:00:00 AM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=4) AND ([AMBatch.CreatedDateTime]>= '1:30:00 AM' AND [AMBatch.CreatedDateTime]<= '4:00:00 AM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=5) AND ([AMBatch.CreatedDateTime]>='1:30:00 AM' AND [AMBatch.CreatedDateTime]<= '4:00:00 AM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=6) AND ([AMBatch.CreatedDateTime]>='1:30:00 AM' AND [AMBatch.CreatedDateTime]<='11:59:59 PM')) OR ((DayOfWeek([AMBatch.CreatedDateTime])=7) AND ([AMBatch.CreatedDateTime]>='12:00:00 AM' AND [AMBatch.CreatedDateTime]<='11:59:59 PM')), TRUE, FALSE )
However the system does not recognize these times at all, and will not show any transactions that occurred within this expression.
I’m really grasping at straws here, I feel like I should be close, I just wish there was an easier way to display time so that I can add filter conditions for it.
Does anyone have any thoughts or Ideas on this matter? Has anyone needed to differentiate between straight time production and overtime production? I would be surprised if this is the first time this has come up.
Thanks to all who have helped me get this far, especially