Difference between revisions of "Shift getListByUsers"
(Created page with "{{HelpFiles}} ==== Shift_getListByUsers ==== Return shift of users '''Syntax''' Shift_getListByUsers(array userResourceId) '''Arguments''' *userResourceId: is a...") (Tag: visualeditor-switched) |
Nguyenduyan (talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:General_Functions]] | ||
{{HelpFiles}} | {{HelpFiles}} | ||
==== Shift_getListByUsers ==== | ==== Shift_getListByUsers ==== | ||
− | + | 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 | + | *userResourceId: is array of user resource id |
+ | *StartDate: is DateTime array | ||
+ | *EndDate: is DateTime array | ||
'''Return value''' | '''Return value''' | ||
− | Dictionary which | + | 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> |
Latest revision as of 08:04, 2 June 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
}
}