Date printed: 03-29-2024   Last updated: 06-12-2014

To view our complete support knowledge base and most current version of this article visit support.timeips.com.
316-264-1600
Information
Sales
Support

Allocations and Job Allocations in Reporting



Allocations allow you to create custom codes and amounts that are associated with time events. Job allocations are similar, but specific to a job. The "duplicate this row" and dynamic job allocation mapping functions provide a way to split the hours of an event over those allocation amounts.

 

Duplicating Rows:

 

 

Job Allocations:

The report writer no longer needs to know exactly which job allocation codes to look for ahead of time with the use of the following dynamic job allocation mapping function:

jobAllocationList($key, $delimiter=',')

key can be any 'code', 'amount', or 'note'.
delimiter will default to a comma but can be any string to define a text delimiter between values or can be NULL to make the return value be an array.
The function will return the appropriate values for the designated key for any job allocations used on this event.

 

 

Array Mapping

To prevent the jobAllocationList('amount') from just returning a list of the percentage values designated for the splits such as 50,25,25, we'll use a function similar to php's array_map that will divide each of these numbers by 100 and multiply it by the duration. The following function

listMap($list, $expression)

will take each value in list, call it listMapValue, add it to the row's data and evaluate a new expression with it. The idea is that you can then do things like this

listMap( jobAllocationList('amount'), {{ [duration]*[listMapValue]/100/3600 }} )

The expression has to be passed in with double curly braces to signify the start and end of the expression. This is so the expression engine will know to not attempt to process any of the pieces of that new expression until its time.
If you pass $list as a string then you will get a string back with the modified values. If you pass in an array you will get an array back.

 

 

Putting it All Together

To split an event over allocations, you can do something like this:

Col 1: Employee Name
Col 2 Expression: =duplicate(jobAllocationList('code'))
Col 3 Expression: =duplicate(listMap(jobAllocationList('amount'),{{ [duration]*[listMapValue]/100/3600 }} ))

 



©2004-2023 TimeIPS, Inc. All Rights Reserved - TimeIPS and the TimeIPS logo are registered trademarks of TimeIPS, Inc.
"Intelligent Personnel System" "Run your Business. We'll watch the clock." are trademarks of TimeIPS, Inc.
TimeIPS is protected by one or more patents. Patent No. US 7,114.684 B2.