More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{HelpFiles}} | |||
{{HelpFiles}} | |||
==== Project_new ==== | |||
Create a new project object | |||
'''Syntax''' | |||
Project_new(''name, templateResourceId, parentResourceId'') | |||
'''Arguments''' | |||
*''name'': is a ''string ''expression. It is the name of the new project | |||
*''templateResourceId'': is a ''number ''expression. It is the id of project resource template | |||
*''parentResourceId'': is a ''number ''expression. It is the id of the parent resource | |||
'''Return value''' | |||
An ''array'', it is a project object which contains the following items | |||
{| width="875" cellspacing="0" cellpadding="2" border="1" class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse;" | |||
|- valign="top" align="left" | |||
| width="292" bgcolor="#c0c0c0" style="border: 1px solid rgb(1, 1, 1);" | | |||
'''Index''' | |||
| width="116" bgcolor="#c0c0c0" style="border: 1px solid rgb(1, 1, 1);" | | |||
'''Data type''' | |||
| width="467" bgcolor="#c0c0c0" style="border: 1px solid rgb(1, 1, 1);" | | |||
'''Value''' | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_RESOURCE_ID</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">number</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Resource id</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_NAME</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Username</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_TEMPLATE_RESOURCE_ID</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">number</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">User template's resource id</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_PASSWORD</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Password</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_TIME_REGISTRATION</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">bool</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">If time registration is allowed</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_MAN_HOURS</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">number</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Number of budget hours</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_CALCULATED_MAN_HOURS</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">bool</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">If number of budget hours is calculated on Team tab's settings</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_PHONE_NUMBER</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">array</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Phone number list</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_ACCESS_EXPIRATION</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">aray</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Expiration date</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_PROTECTED_UNTIL</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">array</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Protection deadline</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_LANGUAGE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Language's ISO code</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_CULTURE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Culture's ISO code</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_EMAIL</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Email address</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_FIRST_NAME</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">First name</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_MIDDLE_NAME</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Middle name</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_LAST_NAME</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Last name</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_CURRENCY</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Currency</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_DISCOUNT</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Discount</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_POINT_BALANCE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">number</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Point balance (read-only)</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_TIMEZONE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">number</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Timezone</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_ADDRESS</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Address</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_CITY</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">City</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_ZIPCODE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Zip code</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_REGION</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Region</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_COUNTRY</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Country's ISO code</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_POSTBOX</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Postbox</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_WEBSITE</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">string</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">Website</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_DELETED</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">bool</span> | |||
=== | | width="467" style="border: 1px solid rgb(1, 1, 1);" | | ||
<span class="normalise">If the user is deleted</span> | |||
|- valign="top" align="left" | |||
| width="292" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">USER_DISABLED</span> | |||
| width="116" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">bool</span> | |||
| width="467" style="border: 1px solid rgb(1, 1, 1);" | | |||
<span class="normalise">If the user is disabled</span> | |||
|} | |||
'''Example''' | |||
'' | ''[PROJECT_PLANNED_START_DATE] = getDateTime(); '' | ||
''Project_save(project);'' | |||
'' | '''Availability''' | ||
Version 5.6 __NOTOC__ <!-- imported from file: 6263.htm--> | |||
[[Category:Project]] | |||
Revision as of 09:18, 22 December 2011
Project_new
Create a new project object
Syntax
Project_new(name, templateResourceId, parentResourceId)
Arguments
- name: is a string expression. It is the name of the new project
- templateResourceId: is a number expression. It is the id of project resource template
- parentResourceId: is a number expression. It is the id of the parent resource
Return value
An array, it is a project object which contains the following items
Index |
Data type |
Value |
USER_RESOURCE_ID |
number |
Resource id |
USER_NAME |
string |
Username |
USER_TEMPLATE_RESOURCE_ID |
number |
User template's resource id |
USER_PASSWORD |
string |
Password |
USER_TIME_REGISTRATION |
bool |
If time registration is allowed |
USER_MAN_HOURS |
number |
Number of budget hours |
USER_CALCULATED_MAN_HOURS |
bool |
If number of budget hours is calculated on Team tab's settings |
USER_PHONE_NUMBER |
array |
Phone number list |
USER_ACCESS_EXPIRATION |
aray |
Expiration date |
USER_PROTECTED_UNTIL |
array |
Protection deadline |
USER_LANGUAGE |
string |
Language's ISO code |
USER_CULTURE |
string |
Culture's ISO code |
USER_EMAIL |
string |
Email address |
USER_FIRST_NAME |
string |
First name |
USER_MIDDLE_NAME |
string |
Middle name |
USER_LAST_NAME |
string |
Last name |
USER_CURRENCY |
string |
Currency |
USER_DISCOUNT |
string |
Discount |
USER_POINT_BALANCE |
number |
Point balance (read-only) |
USER_TIMEZONE |
number |
Timezone |
USER_ADDRESS |
string |
Address |
USER_CITY |
string |
City |
USER_ZIPCODE |
string |
Zip code |
USER_REGION |
string |
Region |
USER_COUNTRY |
string |
Country's ISO code |
USER_POSTBOX |
string |
Postbox |
USER_WEBSITE |
string |
Website |
USER_DELETED |
bool |
If the user is deleted |
USER_DISABLED |
bool |
If the user is disabled |
Example
[PROJECT_PLANNED_START_DATE] = getDateTime();
Project_save(project);
Availability
Version 5.6