Difference between revisions of "Quarantine addToQuarantine"
(Created page with "{{HelpFiles}} === Quarantine_addToQuarantine === Specified users are added to that quarantine. === Syntax === Quarantine_addToQuarantine(quarantineRId, userRIdList,Comment...") |
Nguyenduyan (talk | contribs) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
=== Syntax === | === Syntax === | ||
− | Quarantine_addToQuarantine(quarantineRId, userRIdList,Comment); | + | Quarantine_addToQuarantine(quarantineRId[, userRIdList][,Comment]); |
− | === Arguments === | + | === Arguments<br/> === |
quarantineRId: is a number expression. It is the quarantine's resource id. | quarantineRId: is a number expression. It is the quarantine's resource id. | ||
− | userRIdList: Array number resource id of users. | + | userRIdList: Array number resource id of users. Optional |
− | Comment: is a string expression. It must be between 10 and 250 char long. It is contents of comment property of quarantine, you can see it at quarantine history tab of users. | + | Comment: is a string expression. Optional. It must be between 10 and 250 char long. It is contents of comment property of quarantine, you can see it at quarantine history tab of users. |
+ | |||
+ | Note: userRIdList and Comment paramter is optional, but it required questionnaire context when running to set qnaire name as quarantine comment. | ||
=== Return type === | === Return type === | ||
Line 28: | Line 30: | ||
string comment = "quarantine for test"; | string comment = "quarantine for test"; | ||
Quarantine_addToQuarantine(quarantineRId, userRIdList, comment); | Quarantine_addToQuarantine(quarantineRId, userRIdList, comment); | ||
− | |||
</source> | </source> | ||
+ | <br/><source lang="javascript"> | ||
+ | //Example for add quarantine without comment parameter | ||
+ | setRPQId(1742872963);//rpq on qnire name "An test - in/ex from" | ||
+ | number quarantineRId = 15549081; | ||
+ | Quarantine_addToQuarantine(quarantineRId); | ||
+ | //result: Add current user (logged in user) to the quarantine with comment is qnaire displayname (name on "Alias" field). | ||
+ | //If the qnaire lacking displayname will show resourcename (name on "Questionnaire name" field) | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //Example for add quarantine without arrayUserRId and comment parameters | ||
+ | setRPQId(1742872963);//rpq on qnire name "An test - in/ex from" | ||
+ | number quarantineRId = 15549081; | ||
+ | array arrayUserRId={14618942,14620060}; | ||
+ | Quarantine_addToQuarantine(quarantineRId,arrayUserRId); | ||
+ | //result: Add uers in the user array to the quarantine with comment is qnaire displayname (name on "Alias" field). | ||
+ | //If the qnaire lacking displayname will show resourcename (name on "Questionnaire name" field) | ||
+ | </source> | ||
+ | [[Category:Quarantine_Functions]] |
Latest revision as of 04:28, 30 November 2016
Quarantine_addToQuarantine
Specified users are added to that quarantine.
Syntax
Quarantine_addToQuarantine(quarantineRId[, userRIdList][,Comment]);
Arguments
quarantineRId: is a number expression. It is the quarantine's resource id.
userRIdList: Array number resource id of users. Optional
Comment: is a string expression. Optional. It must be between 10 and 250 char long. It is contents of comment property of quarantine, you can see it at quarantine history tab of users.
Note: userRIdList and Comment paramter is optional, but it required questionnaire context when running to set qnaire name as quarantine comment.
Return type
Empty
Examples
number quarantineRId = 15525774;
array userRIdList = {15498958,15517129,15525326,15525327,15525328};
string comment = "quarantine for test";
Quarantine_addToQuarantine(quarantineRId, userRIdList, comment);
//Example for add quarantine without comment parameter
setRPQId(1742872963);//rpq on qnire name "An test - in/ex from"
number quarantineRId = 15549081;
Quarantine_addToQuarantine(quarantineRId);
//result: Add current user (logged in user) to the quarantine with comment is qnaire displayname (name on "Alias" field).
//If the qnaire lacking displayname will show resourcename (name on "Questionnaire name" field)
//Example for add quarantine without arrayUserRId and comment parameters
setRPQId(1742872963);//rpq on qnire name "An test - in/ex from"
number quarantineRId = 15549081;
array arrayUserRId={14618942,14620060};
Quarantine_addToQuarantine(quarantineRId,arrayUserRId);
//result: Add uers in the user array to the quarantine with comment is qnaire displayname (name on "Alias" field).
//If the qnaire lacking displayname will show resourcename (name on "Questionnaire name" field)