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.

Team addTeamMember: Difference between revisions

From Catglobe Wiki
Created page with "Category:String_Functions {{HelpFiles}} ====stringjoin==== The function joins the elements of an array into a string, and returns the string. The elements will be..."
 
Nguyenduyan (talk | contribs)
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:String_Functions]]
[[Category:Team_Functions]]
{{HelpFiles}}
{{HelpFiles}}  


====stringjoin====
= Team_addTeamMember =


The function joins the elements of an array into a string, and returns the string.
Add a member into a Team (On GUI, Team is under Team tab of resource)


The elements will be separated by a specified separator. The default separator is comma (,).
== Syntax ==


===Syntax===
Team_addTeamMember(team, teamMember);


stringjoin(separator,arrayresource);
== Arguments ==


===Arguments===
team: is Team object. See [[Team_new]], [[Team_getTeamByResourceId]]


separator: Is a string expression. The separator to be used.
teamMember: is TeamMember Object. See [[TeamMember_new]]
arrayresource: Is an array expression.  


===Return type===
== Return type ==
empty


A String, representing the array values, separated by the specified separator
== Example ==


===Examples===
<source lang="javascript">
<source lang="javascript">
string stringResult = stringjoin("-",{"A","B","C"});
number projectRId = 15562383;
print(stringResult);
number teamTypeId = 1;
//Result: A-B-C
number groupRId = 15567436;
array team = Team_getTeamByResourceId (projectRId, teamTypeId, groupRId);
number roleId = 2;
number teamMemberRId = 15567438;
number Manhours = 30;
array teamMember = TeamMember_new(roleId,teamMemberRId, Manhours);
Team_addTeamMember(team, teamMember);
Team_save(team);


</source>
</source>
The team before add member
[[File:Team3.png]]
The team after add member
[[File:Team5.png]]

Latest revision as of 06:38, 22 June 2017


Team_addTeamMember

Add a member into a Team (On GUI, Team is under Team tab of resource)

Syntax

Team_addTeamMember(team, teamMember);

Arguments

team: is Team object. See Team_new, Team_getTeamByResourceId

teamMember: is TeamMember Object. See TeamMember_new

Return type

empty

Example

number projectRId = 15562383;
number teamTypeId = 1;
number groupRId = 15567436;
array team = Team_getTeamByResourceId (projectRId, teamTypeId, groupRId);
number roleId = 2;
number teamMemberRId = 15567438;
number Manhours = 30;
array teamMember = TeamMember_new(roleId,teamMemberRId, Manhours);
Team_addTeamMember(team, teamMember);
Team_save(team);

The team before add member


The team after add member