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

Timereg getByUsers: Difference between revisions

From Catglobe Wiki
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Functions]]
[[Category:Timereg]]
{{HelpFiles}}
{{HelpFiles}}


Line 18: Line 18:
=== Return type ===
=== Return type ===


The function returns a dictionary of user resource id as key and list of array as value  
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:
Value is array, in which there are 7 items:
Line 81: Line 81:


| style="border: 1px solid rgb(1, 1, 1)" width="558" |  
| style="border: 1px solid rgb(1, 1, 1)" width="558" |  
It's Timereg resource id  
It's Timereg resource id


|- valign="top" align="left"
|- valign="top" align="left"
Line 91: Line 91:


| style="border: 1px solid rgb(1, 1, 1)" width="558" |  
| style="border: 1px solid rgb(1, 1, 1)" width="558" |  
It's array datetime  
It's array datetime


|- valign="top" align="left"
|- valign="top" align="left"
Line 104: Line 104:


|}
|}




Line 115: Line 116:
/*
/*
{
{
"717536":  
"717536":  
{
{
{38,112561,1,796156,29185,{2016,4,1,0,0,0,0,13},0},
{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,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}
{38,113095,1,797702,29185,{2016,4,1,0,0,0,0,13},0}
}
}
}
}
*/
*/
</source>
</source> __NOTOC__
__NOTOC__

Revision as of 02:22, 15 April 2016


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}
 }
}
*/