Functions Dialog Box
This dialog box displays a list of functions that you can use when building a sort, filter, calculated field, or global edit expression.
This table provides a summary of these functions, including their purposes, data types, and syntax.
| Function | Purpose | Data Type | Syntax | Example |
|---|---|---|---|---|
| ABS() | This function returns the absolute value of a numeric variable. | Decimal or integer | ABS(<value>)
where: <value> is a numeric variable. |
If y contains the value [4] or [-4], the statement:
ABS(y) returns the value [4] |
| BASELINE FIELD() | This function returns a field value for a selected baseline directory record. | Any | BASELINE_FIELD(<Selection Index>, <Field Name>)
where: <Selection Index> is an integer between 1 - 3 designating the index of the baseline in the current project. (0 may also be entered, in which case it is equivalent to 1, and returns the first selected baseline.) |
BASELINE_FIELD(2, "DESCRIPTION").
For the baseline selected at position 2 for the current project, this statement returns a character string with the description that was entered when the baseline was created. |
| CDOW() | This function returns the full day of the week (for example, Tuesday). | Character | CDOW(<date>)
where: <date> is a date variable or user-entered date. |
Assuming that ESDATE is 05OCT04 (Tuesday), the statement:
CDOW(ESDATE) returns Tuesday. |
| CMONTH() | This function returns the full month of the year (for example, October). | Character | CMONTH(<date>)
where: <date> is a date variable or user-entered date. |
Assuming ESDATE is 05OCT04, the statement:
MONTH(ESDATE) returns October. |
| CTOD() | This function (Calendar to Date) converts a character string to a value with a DATE data type. This is useful in calculated field expressions where you want to coerce the result of an operation to type DATE. | Date | CTOD (<String Expression>)
where: <String Expression> is a quotation-mark delimited string with a valid date format. |
CTOD(STR(USER_NUM01) + "/" + STR(USER_NUM02) +
STR(YEAR(TIMENOW()))) If USER_NUM01 = 12, USER_NUM02 = 31, and Time Now = 1/1/2006, the date result returned will be {12/31/2006}. |
| DATE() | This function returns the current date. | Date | DATE () | Assuming the current date is October 5, 2004, the statement:
DATE() returns 05OCT04. |
| DATEADD() | This function enables you to add a duration to a date and returns a date. | Date | DATEADD (<start date>, <duration>, <calendar>)
where:
If the temporary filter, temporary sort, calculated field or global edit is based on the activity table, you can also specify the word clh_id to have Open Plan use the calendar assigned to the specific activity. However, if the global edit is based on the assignment table, specify act_id.clh_id instead of clh_id. |
Assuming that ESDATE is 04OCT04, the statement:
DATEADD(ESDATE,|2d|, "CAL1") returns 05OCT04 based on calculations using the calendar named CAL1. |
| DATEDIFFERENCE() | This function returns the difference between two dates as a duration. | Duration | DATEDIFFERENCE (<date1>, <date2>, <calendar>)
where:
If the temporary filter, temporary sort, calculated field, or global edit is based on the activity table, you can also specify the word clh_id to have Open Plan use the calendar assigned to the specific activity. However, if the global edit is based on the assignment table, specify act_id.clh_id instead of clh_id. |
Assuming that ESDATE is 05OCT04 and EFDATE is 06OCT04, the statement:
DATEDIFFERENCE(ESDATE, EFDATE, "CAL1") returns 2d based on calculations using the calendar named CAL1. |
| DATEFORMAT() | This function returns a date in a specified format. It uses the Open Plan standard date formats. | Character | DATEFORMAT (<date field>, <format string>)
where:
DATEFORMAT() uses the same date formats as those used when specifying dates on the Manual tab of the Date Scale Preferences dialog box. |
Assuming that ESDATE is October 5, 2004, the statement:
DATEFORMAT(ESDATE, "%D%A%Y") returns 05OCT04. |
| DAY() | This function returns a numeric value 1 through 31 for the day of the month. | Integer | DAY(<date>)
where: <date> is a date variable or user-entered date. |
Assuming that ESDATE is 05OCT04, the statement:
DAY(ESDATE) returns 5. |
| DOW() | This function returns a numeric value 1 through 7 for the day of the week. The actual number returned depends on settings on the General tab of the Options dialog box for the first day of the week. | Integer | DOW(<date>)
where: <date> is a date variable or user-entered date. |
Assuming that ESDATE is 05OCT04 (Tuesday), the statement:
DOW(ESDATE) returns 3. |
| DURATION() | This function returns the number of minutes corresponding to a given duration. | Integer | DURATION(<Duration Value>)
where: <Duration Value> is a duration variable or user-entered duration |
Assuming an 8-hour workday, the statement:
Duration(|2d|) returns 960 (8 hours x 2 days x 60 minutes/hour). |
| EVAL() | This function evaluates its string expression argument as a dynamic calculated field rather than as a string literal. The data type that is returned depends on the contents of the string expression and can be of any type. | Character | EVAL(<exp>)
where: <exp> evaluates to a string expression argument to be calculated as a dynamic calculated field rather than as a string literal. |
Assuming that the value of USER_CHR01 is "ESDATE" and USER_CHR02 is "EFDATE" and that ESDATE is 04OCT04 and EFDATE is 06OCT04, the statement:
EVAL(USER_CHR02+"-"+USER_CHR01) returns 2d. EVAL first evaluates the expression in this example as the following string expression: "EFDATE" + "-" +"ESDATE" The function then resolves the string expression as an embedded calculated field. Because we are effectively subtracting two dates, the resulting value 2 is a duration. |
| FAIL_EVALUATE() | This function tests for a condition that normally would cause the calculated field to return either a blank value or an invalid result (the latter would keep the remainder of the expression from being evaluated). | Boolean | FAIL_EVALUATE(<String Expression>)
where: <String Expression> is an expression in string format. |
FAIL_EVALUATE("C25")
If there is no code file assigned at index 25, this calculated field will return True. Note that if you substituted the expression "C25 IS_EMPTY" as an alternative to using FAIL_EVALUATE, the returned value would be True whether C25 does not exist or C25 exists but is blank. |
| FISCALPERIOD() | This function returns the user-defined label for a specific fiscal reporting period for a specific date. | Character | FISCALPERIOD(<Date>,<Reporting Calendar>)
where: <Date> is the search date to be located within a fiscal period. < Reporting Calendar> is an optional parameter (defaulting to the project reporting calendar). |
FISCALPERIOD(ESDATE)
FISCALPERIOD(ESDATE, "REPORTING_CALENDAR_NAME")
The function returns the LABEL field from the reporting calendar that includes the supplied date. For example, given the following DATE and LABEL fields: DATE LABEL 01/26/2001 Jan 2001 02/23/2001 Feb 2001 03/23/2001 Mar 2001 |
| FORMAT_HEADING_ITEM() | This function is used to create custom group headings with summary rows (that is, the summary type for the group row is marked as "Heading"). | Character | FORMAT_HEADING_ITEM (<expression>,<widthincharunits>,<wordwrap>,<summarize>)
where:
|
Given the following calculated field expression: FORMAT_HEADING_ITEM(C2 + " - ",20,0,0) + FORMAT_HEADING_ITEM(C2.DESCRIPTION,40,1,0) + FORMAT_HEADING_ITEM(C2.< Default >,20,1,0)
The output in a spreadsheet grouped on C2, using the above calculated field as the Heading field, would look something like this: |
| GET ASSGNS() | This function returns assignment data for an activity. | Character | GET_ASSGNS(<fieldname1>[ |<fieldname2>…])
where: <fieldname1>, <fieldname2> are names of fields in the Resource Assignment table. Because the GET_ASSGNS() function works within a specific data table, it is important that the table portion of the fieldname be removed when using this function. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
Assuming that the resource assignments for the activity are ENG (a level 1 resource pool) and TECH.MARY (a level 2 resource), the statement:
GET_ASSGNS("RES_ID|RES_LEVEL") returns ENG,1.00;TECH.MARY,2.00. |
| GET_CHILDREN() | This function returns a list of fields for the top level of children (that is, grandchildren are not included) of the current hierarchical record (activities, resources, and codes). | String | GET_CHILDREN(<FieldList>)
where: <FieldList> is a pipe-delimited string containing the list of fields to be returned. Fields are separated by commas, and records are separated by semicolons in the returned data. |
GET_CHILDREN("ACT_ID|DESCRIPTION")
Given an activity "1.01" with children "1.01.01" and "1.01.02", the returned string would be the following: 1.01.01,First child of 1.01;1.01.02,Second child of 1.01 |
| GET COSTS() | This function returns cost records for an activity. | Character | GET_COSTS(<fieldname1>[ |<fieldname2>…])
where: <fieldname1>, <fieldname2> are names of fields in the Cost table. Because the GET_COSTS() function works within a specific data table, it is important that the table portion of the fieldname be removed when using this function. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
Assuming that there are two cost records for the activity, that the actual costs are 1,000 and 4,000, and that the actual quantities are 1 and 2, the statement:
GET_COSTS("ACTUAL_CST|ACTUAL_QTY") returns 1000.00,1.00;4000.00,2.00. |
| GET_FIELD() | This function enables users to display data from other tables or data from other records in the same table. | String | GET_FIELD(<TableType>, <UniqueID>, <FieldName>)
where:
|
GET_FIELD("C2", PARENT(C2), "DESCRIPTION")
On the Activity table, if the current Activity has a code 2 value of "1.2.1.3", the returned string would be 1.2.1. System Engineering. |
| GET_FIRST_RECORD_IN_SUMMARY() | This function returns the value for the requested field. For a group summary row, it returns the value of the requested field for the first child record. | Same data type as input field | GET_FIRST_RECORD_IN_SUMMARY (<TableType>, <UniqueID>,<FieldName>)
where: FieldName = the field in Table TableType that has a value you want returned. Note that the field name must be enclosed in quotation marks. Otherwise, the VALUE of the field, not the field name itself, will be passed as the argument. |
The GET_FIRST_RECORD_IN_SUMMARY function enables you to construct a calculated field result in a summary row that uses a break column value rather than a summary value. For example, given the following filter in a barchart (with a visibility setting of "All levels of Rollup and Detail"), with a spreadsheet pane grouped on TOTALFLOAT:
TOTALFLOAT > |2d| The filter would evaluate to TRUE for all child rows of groupings where the TOTALFLOAT break-on value is greater than |2d|. However, the filter would evaluate to FALSE on the grouping summary rows because the value of the TOTALFLOAT field on the summary row is undefined (durations cannot be summarized). Even for a numeric or date field (which can be summarized), the filter would have to be written differently to account for a summarized value on a summary row. To work around this problem, the following syntax will give us the result we want: GET_FIRST_RECORD_IN_SUMMARY("TOTALFLOAT") > |2d| |
| GET NOTE() | This function returns the first 1024 characters of an activity note or resource note. If the note exceeds 1024 characters, the note is truncated at the limit and an ellipsis (…) displays. | Character | GET_NOTE(<category>)
where: <category> is the name of a note category. This field is optional. If you leave <category> blank, the function assumes the default category. |
Assuming that a category <Document> has been set up for an activity table, the statement:
GET_NOTE("Document") returns the Document category note about the activity. Example 2 Assuming that you want to use the default category for an activity note, the statement: GET_NOTE("") returns the default category note about the activity. |
| GET PREDS() | This function returns predecessor data for an activity. | Character | GET_PREDS(<fieldname1>[ |<fieldname2>…])
where: <fieldname1>, <fieldname2> are names of fields in the Relationship table. Because the GET_PREDS() function works within a specific data table, it is important that the table portion of the fieldname be removed when using the function. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
Assuming that the predecessor to an activity is A100, and that the relationship type is Finish to Start, the statement:
GET_PREDS("PRED_ACT_ID|REL_TYPE") returns A100,Finish to Start. |
| GET_RELATED() | This function returns a list of fields for each member of a child collection related to the main collection. This is a more generic version of the more specialized functions, GET_PREDS(), GET_SUCCS(), GET_ASSGNS(), and so on. | String | GET_RELATED(<CollectionType>, <FieldList>)
where:
|
|
| GET_RELATED_COUNT | This function returns a record count. The two parameters for the function are the related collection identifier and an optional filter. You use this primarily with activity and baseline activity tables. | String | GET_RELATED_COUNT(RELATED_COLLECTION_IDENTIFIER, <FILTER_ON_RELATED_COLLECTION>)
You can use the function with one of the following related collection identifiers:
|
You might want a count of all children for a subproject activity (GET_RELATED_COUNT("CHILD")), or you may want to get a count of all predecessors for a particular activity with a relationship lag of 0 (GET_RELATED_COUNT(PRD", "REL_LAG = |0|"). |
| GET RISKS() | This function returns the percentile points for each of the requested fields on a key activity. (By default, 21 percentile points are returned. These are 0,5,10,15,…100.) | Character | GET_RISKS("<fieldname1>[ |<fieldname2>…"])
where: <fieldname1>, <fieldname2> are names of fields in the Risk table. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
The statement:
GET_RISKS("ESDATE1") returns the percentile points for each early start date calculated during risk analysis. For example, Open Plan might show that risk analysis has calculated that the early start date for a key activity falls on or before Jan 15 during 5% of simulations, on or before Jan 16 during 10% of the simulations, and so on. |
| GET SUCCS() | This function returns successor data for an activity. | Character | GET_SUCCS(<fieldname1>[ |<fieldname2>…])
where: <fieldname1>, <fieldname2> are names of fields in the Relationship table. Because the GET_SUCCS() function works within a specific data table, it is important that the table portion of the fieldname be removed when using this function. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
Assuming that the successor to an activity is A200, and that the relationship type is Finish to Start, the statement:
GET_SUCCS("SUCC_ACT_ID|REL_TYPE") returns A200,Finish to Start. |
| GET USAGES() | This function returns use records for an activity. | Character | GET_USAGES(<fieldname1>[ |<fieldname2>…])
where: <fieldname1>, <fieldname2> are names of fields in the Use table. Because the GET_USAGES() function works within a specific data table, it is important that the table portion of the fieldname be removed when using this function. The pipe symbol (|) is used as a separator between the desired fields. The entire expression within the set of () must be enclosed by quotation marks. The text string returned for this function uses commas (,) to separate the different data items within each record and semicolons (;) to separate each record. |
Assuming that an activity having a single use record shows that 24 units of the resource ENG have been used, the statement:
GET_USAGES("RES_CODE|RES_USED") returns ENG,24. |
| GOMONTH() | This function returns a date that is the specified number of months before or after a specified date. | Date | GOMONTH(<date>,<integer>)
where:
|
Assuming that ESDATE is 05OCT04, the statement:
GOMONTH(ESDATE , -2) returns 05AUG04. |
| HAS NOTE() | This function returns a logical value indicating whether a note is attached to an object. You can also determine whether a note with a specified category is attached to the object. | Logical | HAS_NOTE(<"string">)
where: <string> is any character. This string is optional. |
Assuming that an activity has a note attached, the statement
HAS_NOTE() returns TRUE. Example 2 Assuming that an activity has a note in the category "Scope," the statement: HAS_NOTE("Scope") returns TRUE. |
| IIF() | This function (Immediate If) provides a means of defining conditional processing in a report. | Any | IIF(<logicexp>,<iftrue>,<iffalse>)
where:
|
If <logicexp> evaluates to true, the calculated field or global edit is set to the value of <iftrue>; otherwise, the calculated field or global edit is set to the value of <iffalse>.
Example: Assuming that ESDATE is 21JUN04, the statement: IIF(ESDATE>{01JUL04}, "Underway", "Planned") returns Planned. |
| INLIST() | This function returns a logical value indicating whether a value is included in a list. | Logical | NLIST(<search>,<value1>, <value2>, ...)
where:
Open Plan interprets a character argument as a comma-delimited list of items. |
Assuming that the early start date month is June, the statement:
INLIST(MONTH(ESDATE),1, 4, 7, 10) returns FALSE. Example 2 Assuming that "CHRIS" is the local portion of a resource code, the statement: INLIST("CHRIS",GET_ASSGNS("LOCAL(RES_CODE)")) returns TRUE for the activities to which CHRIS is assigned. |
| INSTR() | This function returns the position of the first occurrence of one string from within another string. If the string that is sought is not found, this function returns 0. | Integer | INSTR(<start>,<string1>,<string2>)
where:
The string expressions are case sensitive. |
Assuming the following string expression to be searched:
SITE COORDINATION AND DESIGN and the following string being sought: COORDINATION The statement: INSTR(1, "SITE COORDINATION AND DESIGN", "COORDINATION") returns 6. |
| LEFT() | This function returns a specified number of leftmost characters in a string. | Character | LEFT(<string>,<int>)
where:
The string expression is case sensitive. |
The statement:
LEFT("SITE COORDINATION AND DESIGN",4) returns SITE. |
| LEN() | This function returns a numeric value that is the length of a variable or constant. | Integer | LEN(<data>)
where: <data> is a character, date, or numeric variable, or a character or numeric constant. |
The statement:
LEN("Dig Hole") returns 8. Example 2 Assuming the field Act_Desc is 30 characters long and contains the string "EXCAVATION", then the statement: LEN(Act_Desc) returns 10. Note that it is irrelevant that the field width is 30 characters. |
| LEVEL() | This function returns the hierarchical level of an ID or code. | Integer | LEVEL(<ID>)
where: <ID> is a character variable or constant. |
Assuming that a code named C1 is assigned to the project, then the statement:
LEVEL(C1) returns the level of the activity in the code structure. |
| LOCAL() | This function returns the "local" portion of an ID or code (that is, the portion of the ID or code that is not shared by other children of the same parent). | Character | LOCAL(<ID>, <level>)
where:
|
Assuming that a code named C1 is assigned to the project, then the statement:
LOCAL(C1) returns the local (rightmost) portion of C1 at the current level code structure. |
| LOWER() | This function converts alphabetic characters from uppercase to lowercase. | Character | LOWER(<string>)
where: <string> is a character variable or constant. |
The statement:
LOWER("Dig Hole") returns dig hole. |
| LTRIM() | This function trims leading spaces from a string. | Character | LTRIM(<string>)
where: string is a character string. |
Assuming that the activity description is "^^^^^^Administration", the statement:
LTRIM(ACT_DESC) returns Administration. In this example, each caret symbol (^) is used to represent a space. |
| MAX() | This function returns the maximum value from a list of variables. | Decimal, integer, character, date, or duration | MAX(<value1> [,<value 2>, ...])
where: <value1>, <value2> are decimals, integers, characters, or dates. Open Plan interprets a character argument as a comma-delimited list of items. |
Assuming that value1 is 4, value2 is 25, and value3 is 66, the statement:
MAX(4, 25, 66) returns 66. Example 2 Assuming that USER_CHR01 contains a comma-delimited list of the values 5, 1, 8, and 3, the statement: MAX(USER_CHR01) returns 8. |
| MID() | Beginning at a specified location within a string, this function returns a specified number of characters in a string. If the number of characters to extract is not specified, this function returns all remaining characters in the string. | Character | MID(<string>,<start>,<int>)
where:
The string expression is case-sensitive. |
The statement:
MID("SITE COORDINATION AND DESIGN", 5, 12) returns COORDINATION. |
| MIN() | This function returns the minimum value from a list of variables. | Decimal, integer, character, date, or duration | MIN(<value1>,<value 2>, ...)
where: <value1>, <value2> are decimals, integers, characters, or dates. Open Plan interprets a character argument as a comma-delimited list of items. |
Assuming that value1 is 4, value2 is 25, and value3 is 66, the statement:
MIN(4, 25, 66) returns 4. Example 2 Assuming that USER_CHR01 contains a comma-delimited list of the values 5, 1, 2, and 3, the statement: MIN(USER_CHR01) returns 1. |
| MONTH() | This function returns a 2-digit numeric value for the month. | Integer | MONTH(<date>)
where: <date> is a date variable or user-entered date. |
Assuming ESDATE is 05JUL04, the statement:
MONTH(ESDATE) returns 7. |
| NEWLINE() | This function inserts one or more lines in the calculated field expression.
While this function is available for both calculated fields and global edits, it is used only in calculated fields. The effect of the NEWLINE() function displays only in spreadsheet columns where wrapping is enabled. |
Integer | NEWLINE(<value>)
where: <value> is an integer representing the number of lines to be added to the expression. <value> cannot be blank. |
The expression:
"Early:"+DATEFORMAT(ESDATE,"%D%A%Y")+NEWLINE(1)+" Late: "+DATEFORMAT(LSDATE,"%D%A%Y")+NEWLINE(1)+ "Sched:"+DATEFORMAT(SSDATE,"%D%A%Y") returns a string similar to the following: Early:12Apr04 Late:16Apr04 Sched:14Apr04 Notice that the NEWLINE() function has forced the Late and Scheduled dates to be moved to the next line. |
| NUMBER_FORMAT() | This function returns a formatted string from a list of parameters. | Number | NUMBER_FORMAT(<integer>, <string>, <int>)
where:
If there are any unrecognized characters in the format string or if the format string contains both "$" and "%," the format string will be returned instead of a value. A blank <string> is interpreted as a DEFAULT format, but the argument cannot be omitted. |
The expression:
NUMBER_FORMAT(1000, "$.", 2) Returns $1,000.00 |
| OCCURS() | This function returns the number of times a string occurs within another string. | Integer | OCCURS(<string1>,<string2>)
where:
The string expressions are case sensitive. |
The statement:
OCCURS("Bright light circuits","ight") returns 2. |
| PARENT() | This function returns the parent ID of a specified level for an ID or code. | Character | PARENT(<ID>, <level>)
where:
|
Assuming that a code named C1 is assigned to the project, then the statement:
PARENT(C1) returns the ID of the immediate parent of the selected activity in the code structure. |
| RECORD_NUMBER() | This function provides a unique number that can be used to identify a particular record. | Integer | RECORD_NUMBER()
where: < No arguments > |
FIELD RECORD_NUMBER()
(Most useful during general Export) |
| RIGHT() | This function returns a specified number of rightmost characters in a string. | Character | RIGHT(<string>,<int>)
where:
The string expression is case-sensitive. |
The statement:
RIGHT("SITE COORDINATION AND DESIGN",6) returns DESIGN. |
| ROUND() | This function returns a numeric or duration value rounded to a specified precision. | Decimal, integer, or duration | ROUND(<value>, <precision>, <type>)
where:
|
The statement:
ROUND(458.9763, 2, "up") returns 458.98. Example 2 The statement: ROUND(orig_dur /3.0, "d") returns the original duration divided by 3.0 and rounded up to the nearest day. Example 3 The statement: ROUND(4589, -2) returns 4600. |
| SPACE() | This function returns a specified number of space characters. | Character | SPACE(<int>)
where: <int> is the number of space characters to be returned. |
The statement:
SPACE(6) returns six space characters. |
| SQRT() | This function returns the square root of the absolute value of a numeric value. | Decimal or integer | SQRT(<value>)
where: <value> is a numeric variable or constant. |
The statement:
SQRT(4) returns 2. |
| STR() | This function converts a numeric to a character variable. It can also be used to return a date in a specified date field. | Character | STR(<value>, <length>, <decimal>)
where:
While the second and third parameters are optional, if you enter one, you must enter the other. The string is specified with the desired number of decimal places; then, if needed, spaces are added as pad characters to the beginning of the string to fulfill the string length requirement. STR(<date field>) where: <date field> is a date field. |
Example for STR(<value>, <length>, <decimal>)
The statement: STR(1.2345, 3, 1) returns 1.2. Example for STR(<date field>) Assuming that ESDATE is October 5, 2004, the statement: STR(ESDATE) returns 05OCT04. |
| STRTRAN() | Within a string, this function replaces one substring with another substring and returns the revised string. | Character | STRTRAN(<string1>,<string2>,<string3>)
where:
The string expressions are case-sensitive. |
The statement:
STRTRAN("SITE MANAGEMENT","MANAGEMENT","SPECIFICATION") returns SITE SPECIFICATION. |
| STUFF() | Beginning with a specified location within a string, this function replaces a specified number of characters with another substring and returns the revised string. | Character | STUFF(<string1>,<start>,<int>,<string2>)
where:
The string expressions are case-sensitive. |
The statement:
STUFF("SITE MANAGEMENT",6,10,"SPECIFICATION") returns SITE SPECIFICATION. |
| SUBSTR() | This function copies a specified part of a character string. | Character | SUBSTR(<string>, <start>, <length>)
where:
|
The statement:
SUBSTR("ABCDEF", 3, 2) returns CD. Example 2 Assuming the ID = "P100", the statement: SUBSTR(ID, 1, 2) returns P1. |
| TIMENOW() | This function returns the currently set Time Now date. | Date | TIMENOW() | Assuming the currently set Time Now date is October 5, 2004, the statement:
TIMENOW() returns 05OCT04. |
| TRIM() | This function removes trailing blanks from a character variable or constant. | Character | TRIM(<string>)
where: <string> is a character variable or constant. |
Assuming that the activity description is "Administration^^^^^^^^^^", the statement:
TRIM(ACT_DESC)+"!!!" returns Administration!!!. In this example, each caret symbol (^) is used to represent a space. |
| UPPER() | This function converts alphabetic characters from lowercase to uppercase. | Character | UPPER(<string>)
where: <string> is a character variable or constant. |
The statement:
UPPER("Dig Hole") returns DIG HOLE. |
| USER_ID() | This function returns the name of the current user. | String | USER_ID(<string>) | USER_ID() returns "SYSADMIN." |
| VAL() | This function converts a character string to a numeric value. It can also be used to convert durations to minutes. | Decimal or integer | VAL(<string>)
where: <string> is a character or duration. If <string> is not a valid numeric value, VAL converts the string starting at the leftmost character until an invalid numeric is encountered. Integer zero is returned if the string does not start with a valid numeric value. |
The statement:
VAL("1678") returns 1678. Example 2 Assuming that the original duration of an activity is 100 days, the statement: VAL(ORIG_DUR) returns 48000 based on conversion preferences set for the project of 8 hours per work day. |
| YEAR() | This function returns a 4-digit numeric value for the year. | Integer | YEAR(<date>)
where: <date> is a date variable or user-entered date. |
Assuming ESDATE is 12JUL04, the statement:
YEAR(ESDATE) returns 2004. |
Related Topics
Related Procedures
- Related Topics:
- Display the Functions Dialog Box
Use this procedure to display the Functions dialog box.