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.

Shift getListByUsers: Difference between revisions

From Catglobe Wiki
Created page with "{{HelpFiles}} ==== Shift_getListByUsers ==== Return shift of users '''Syntax''' Shift_getListByUsers(array userResourceId) '''Arguments''' *userResourceId: is a..."
 
No edit summary
Line 3: Line 3:
==== Shift_getListByUsers  ====
==== Shift_getListByUsers  ====


Return shift of users
get list of shifts that users registered


'''Syntax'''  
'''Syntax'''  


Shift_getListByUsers(array userResourceId)  
Shift_getListByUsers(array userResourceId, array StartDate, array EndDate)  


'''Arguments'''  
'''Arguments'''  


*userResourceId: is a ''array'' expression
*userResourceId: is array of user resource id
*StartDate: is DateTime array
*EndDate: is DateTime array


'''Return value'''  
'''Return value'''  


Dictionary which is Shift Object:
Return Dictionary type, which keys are users resource id and values are array of Shifts Object. You can file more info about Shifts Object at Shift_getUserNextShift
 
'''Example:'''
<source lang="javascript">
 
array UserRId = {10768810,15548207};
array StartDate = {2017,4,28,0,0,0};
array EndDate = {2017,5,4,0,0,0};
Dictionary s = Shift_getListByUsers(UserRId, StartDate, EndDate);
print(s);
 
Result:
{
"10768810": //userRId
{
{25,25723,10768810,7,14229607,0,0,{2017,4,28,7,0,0,0,17,65},{2017,4,28,8,0,0,0,17,65}}, // Shift object
{25,25724,10768810,7,14229607,0,0,{2017,4,28,9,0,0,0,17,65},{2017,4,28,11,0,0,0,17,65}} // Shift object
},
"15548207": //userRId
{
{25,25725,15548207,7,14229607,0,0,{2017,5,3,7,0,0,0,18,65},{2017,5,3,17,0,0,0,18,65}} // Shift object
}
}
</source>
[[Category:General_Functions]]
[[Category:General_Functions]]

Revision as of 09:20, 3 May 2017



Shift_getListByUsers

get list of shifts that users registered

Syntax

Shift_getListByUsers(array userResourceId, array StartDate, array EndDate)

Arguments

  • userResourceId: is array of user resource id
  • StartDate: is DateTime array
  • EndDate: is DateTime array

Return value

Return Dictionary type, which keys are users resource id and values are array of Shifts Object. You can file more info about Shifts Object at Shift_getUserNextShift

Example:

array UserRId = {10768810,15548207};
array StartDate = {2017,4,28,0,0,0};
array EndDate = {2017,5,4,0,0,0};
Dictionary s = Shift_getListByUsers(UserRId, StartDate, EndDate);
print(s);

Result:
{
	"10768810": //userRId
	{
		{25,25723,10768810,7,14229607,0,0,{2017,4,28,7,0,0,0,17,65},{2017,4,28,8,0,0,0,17,65}}, // Shift object 
		{25,25724,10768810,7,14229607,0,0,{2017,4,28,9,0,0,0,17,65},{2017,4,28,11,0,0,0,17,65}} // Shift object
	},
	"15548207": //userRId
	{
		{25,25725,15548207,7,14229607,0,0,{2017,5,3,7,0,0,0,18,65},{2017,5,3,17,0,0,0,18,65}} // Shift object
	}
}