Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Timereg getByUsers

From Catglobe Wiki


Timereg_getByUsers

Returns a dictionary where keys are resource ids and value is a dictionary where the key is the userid and the value is a list of timereg arrays ordered by the date.

Syntax

Timereg_getByUsers(UserResourceId, dateStart, dateEnd)

Arguments

  • UserResourceId: is a array user resource id
  • dateStart: is a array datetime
  • dateEnd: is a array datetime

Return type

The function returns a dictionary of user resource id as key and list of array as value

Value is array, in which there are 7 items:

Constant

Data type

Value

OBJECT_TYPE_INDEX

number

It's index of object type

TIMEREGRESOURCE_ID

number

It's Timereg id

TIMEREGRESOURCE_HOURS

number

It's number of hours regtime

TIMEREGRESOURCE_RESOURCE_ID

number

It's task resource id

TIMEREGRESOURCE_TIMEREG_ID

number

It's Timereg resource id

TIMEREGRESOURCE_DATE

Datetime

It's array datetime

TIMEREGRESOURCE_ROLE_ID

number

It's Timereg role id


Examples

array dateStart = DateTime_fromInvariant("2016-04-01 00:00:00");
array dateEnd = DateTime_fromInvariant("2016-04-10 00:00:00");
Dictionary regtime = Timereg_getByUsers({717536}, dateStart, dateEnd);

/*
{
 "717536": 
 {
 {38,112561,1,796156,29185,{2016,4,1,0,0,0,0,13},0},
 {38,112975,1,794623,29327,{2016,4,5,0,0,0,0,14},0},
 {38,113095,1,797702,29185,{2016,4,1,0,0,0,0,13},0}
 }
}
*/