Difference between revisions of "Group new"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{HelpFiles}}  
 
{{HelpFiles}}  
  
==== Group_new ====
+
==== Group_new ====
  
Create a group object  
+
Create a group object
  
'''Syntax '''  
+
'''Syntax'''
  
Group_new(''name, groupTemplateResourceId, parentResourceId'')  
+
Group_new(''name, groupTemplateResourceId, parentResourceId'')
  
'''Arguments'''  
+
'''Arguments'''
  
*''name'': is a string expression. It is the name of the group, which must follow the standard format of resource name  
+
*''name'': is a string expression. It is the name of the group, which must follow the standard format of resource name
*''groupTemplateResourceId'': is a number expression. It is the resource id of the group's resource template  
+
*''groupTemplateResourceId'': is a number expression. It is the resource id of the group's resource template
 
*''parentResourceId'': is a number expression. It is the resource id of the group's parent
 
*''parentResourceId'': is a number expression. It is the resource id of the group's parent
  
'''Return value'''  
+
'''Return value'''
  
An ''array'', it is the group object which contains the following information  
+
An ''array'', it is the group object which contains the following information
  
{| width="875" class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse;" border="1" cellspacing="0" cellpadding="2"
+
{| class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse" border="1" cellpadding="2" cellspacing="0" width="875"
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#c0c0c0" |  
+
| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="292" |  
 
'''Index'''
 
'''Index'''
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#c0c0c0" |  
+
| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="92" |  
 
'''Data type'''
 
'''Data type'''
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#c0c0c0" |  
+
| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="491" |  
 
'''Value'''
 
'''Value'''
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_RESOURCE_ID
 
GROUP_RESOURCE_ID
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">number</span>
 
<span class="normalise">number</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
Resource id of the group
 
Resource id of the group
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_NAME
 
GROUP_NAME
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">string</span>
 
<span class="normalise">string</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
Name of the group
 
Name of the group
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_TEMPLATE_RESOURCE_ID
 
GROUP_TEMPLATE_RESOURCE_ID
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">number</span>
 
<span class="normalise">number</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
Group template's resource id
 
Group template's resource id
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_PARENT_RESOURCE_ID
 
GROUP_PARENT_RESOURCE_ID
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">number</span>
 
<span class="normalise">number</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
Parent's resource id
 
Parent's resource id
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_TIME_REGISTRATION
 
GROUP_TIME_REGISTRATION
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">bool</span>
 
<span class="normalise">bool</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
If time registration is allowed on the group
 
If time registration is allowed on the group
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_MAN_HOURS
 
GROUP_MAN_HOURS
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">number</span>
 
<span class="normalise">number</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
The budget time for the group
 
The budget time for the group
  
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| width="292" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
 
GROUP_CALCULATED_MAN_HOURS
 
GROUP_CALCULATED_MAN_HOURS
  
| width="92" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
 
<span class="normalise">bool</span>
 
<span class="normalise">bool</span>
  
| width="491" style="border: 1px solid rgb(1, 1, 1);" |  
+
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
 
If the budget time is calculated based on time set in Team tab
 
If the budget time is calculated based on time set in Team tab
 +
 +
|- align="left" valign="top"
 +
| style="border: 1px solid rgb(1, 1, 1)" width="292" |
 +
GROUP_RULES
 +
 +
| style="border: 1px solid rgb(1, 1, 1)" width="92" |
 +
<span class="normalise">array</span>
 +
 +
| style="border: 1px solid rgb(1, 1, 1)" width="491" |
 +
Group rules array
  
 
|}
 
|}
Line 110: Line 120:
 
''number parentResourceId = 37420;''
 
''number parentResourceId = 37420;''
  
''array groupinfo = Group_new(name, groupTemplateResourceId, parentResourceId) ;''
+
''array groupinfo = Group_new(name, groupTemplateResourceId, parentResourceId)&nbsp;;''
  
 
''print(groupinfo);''
 
''print(groupinfo);''
Line 116: Line 126:
 
//{6,0,group test,2066,37420,True,0,False,Empty,Empty,Empty,Empty,Empty,Empty,Empty,{}}
 
//{6,0,group test,2066,37420,True,0,False,Empty,Empty,Empty,Empty,Empty,Empty,Empty,{}}
  
<br> '''Availability'''  
+
<br/>'''Availability'''
 
 
Version 5.6 __NOTOC__
 
  
[[Category:Group_Functions]]
+
Version 5.6 __NOTOC__

Revision as of 06:45, 29 June 2016



Group_new

Create a group object

Syntax

Group_new(name, groupTemplateResourceId, parentResourceId)

Arguments

  • name: is a string expression. It is the name of the group, which must follow the standard format of resource name
  • groupTemplateResourceId: is a number expression. It is the resource id of the group's resource template
  • parentResourceId: is a number expression. It is the resource id of the group's parent

Return value

An array, it is the group object which contains the following information

Index

Data type

Value

GROUP_RESOURCE_ID

number

Resource id of the group

GROUP_NAME

string

Name of the group

GROUP_TEMPLATE_RESOURCE_ID

number

Group template's resource id

GROUP_PARENT_RESOURCE_ID

number

Parent's resource id

GROUP_TIME_REGISTRATION

bool

If time registration is allowed on the group

GROUP_MAN_HOURS

number

The budget time for the group

GROUP_CALCULATED_MAN_HOURS

bool

If the budget time is calculated based on time set in Team tab

GROUP_RULES

array

Group rules array

Example

string name ="group test";

number groupTemplateResourceId = 2066;

number parentResourceId = 37420;

array groupinfo = Group_new(name, groupTemplateResourceId, parentResourceId) ;

print(groupinfo);

//{6,0,group test,2066,37420,True,0,False,Empty,Empty,Empty,Empty,Empty,Empty,Empty,{}}


Availability

Version 5.6