Skip Headers
Oracle® Fusion Middleware Developing with Oracle WebCenter Content
11g Release 1 (11.1.1)

Part Number E26694-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
PDF · Mobi · ePub

A Idoc Script Functions and Variables

This appendix provides information about Idoc Script functions and variables, which you can use for customizing Oracle WebCenter Content.

Idoc Script has many built-in global functions. Functions perform actions, including string comparison and manipulation routines, date formatting, and ResultSet manipulation. Some functions also return results, such as the results of calculations or comparisons.

Information is passed to functions by enclosing the information in parentheses after the name of the function. Pieces of information that are passed to a function are called parameters. Some functions do not take parameters; some functions take one parameter; some take several. There are also functions for which the number of parameters depends on how the function is being used.

In addition to the built-in global functions, you can define new global functions, including custom classes, with Java code. For more information, see Chapter 11, "Getting Started with Content Server Components," and Chapter 17, "Creating Custom Components."

Along with built-in functions, Idoc Script uses a range of variables. Variables which are used within Idoc scripts include dynamic variables, conditional dynamic variables, and page display variables. Many of these variables can be used both within scripts and specified individually in the WebCenter Content config.cfg and intradoc.cfg files, or used in a web browser URL.

For details about variables that are used only in .cfg files or in a web browser URL, see the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content.


abortToErrorPage()

Aborts the current page and displays an error message.

Type and Usage

Parameters

The only parameter is the error message string.

Output

Returns the error message string on an error page.

Example

Aborts the current page and displays Access Denied as an error message:

<$abortToErrorPage("Access Denied")$>

Aborts the current page and displays the value of the StatusMessage variable as an error message:

<$abortToErrorPage("<$StatusMessage$>")$>

See Also


addEmptyOption

Specifies that a metadata field option list has blank value as the first option in the list.

Type and Usage

Output

Example

Specifies that the first value in the option list is blank:

<$if ForceDocTypeChoice and isTrue(ForceDocTypeChoice)$>
    <$addEmptyOption = 1$>
<$endif$>

See Also


AdminAtLeastOneGroup

Checks if the current user has the admin role for at least one security group.

Type and Usage

Output

Example

Can be used to do an optional presentation for an administrator:

<$if (AdminAtLeastOneGroup)$>
    <a href="<$redirect$>">
<$endif$>

See Also


AfterLogin

Specifies whether the current page was created immediately after a login.

Type and Usage

Output

Example

Displays an alternate URL if the page was not created immediately after a login:

<$if not AfterLogin$>
    <a href="<$redirect$>">
<$endif$>

AllowCheckin

Checks if the current user has checkin permission for the content item's security group.

Type and Usage

Output

Example

Can be used to do an optional presentation for a user with checkin permission:

<$if (AllowCheckin)$>
    <a href="<$redirect$>">
<$endif$>

AllowCheckout

Checks whether current user has checkout permission for the content item's security group.

Type and Usage

Output

Example

Can be used to do an optional presentation for a user with checkout permission:

<$if (AllowCheckout)$>
    <a href="<$redirect$>">
<$endif$>

AllowReview

Checks if the current user is allowed to approve or reject the current workflow item.

Type and Usage

Output

Example

Displays Approve and Reject buttons if the user is a reviewer:

<$if AllowReview$>
    <$include workflow_doc_action_buttons$>
<$endif$>

AuthorAddress

Specifies the e-mail address of the author of a content item.

Type and Usage

Output

Returns a string or Boolean value depending on use.

Example

Can be used to alert the content item author through e-mail when a revision is made.

<$AuthorAddress$>

AuthorDelete

Enables authors of content items to delete their own revisions without having the Delete privilege for the security group.

Type and Usage

Location

Example

As a configuration entry:

AuthorDelete=true

As Idoc Script:

<$if AuthorDelete$>
    <$AuthorDelete$>
<$else$>
    false
<$endif$>

AutoNumberPrefix

Defines the prefix that will be added to all automatically numbered Content IDs.

Type and Usage

Location

Example

As a configuration setting, defines the automatic numbering prefix:

AutoNumberPrefix=HR

As Idoc Script, returns the value of the configuration setting:

<$AutoNumberPrefix$>

See Also


BatchLoaderPath

Defines the path to the default batch load text file.

Returns the file path as a string.

Type and Usage

Location

DomainHome/ucm/cs/bin/intradoc.cfg

Example


break()

Often used to terminate a loop.

Type and Usage


BrowserVersionNumber

Retrieves the version number of the client browser.

Type and Usage

Output

Returns the browser version number as a string.

Example

Can be used to ensure that the user has a browser version compatible with Content Server.

<$BrowserVersionNumber$>

c

Specifies a comment in Idoc Script code.

Type and Usage

Example

Places a comment in the code:

<$c = "Sets the variables to empty strings."$>

cacheInclude()

This function acts similar to the inc() Idoc Script function. It will evaluate the dynamic html include corresponding to includeName and display it on the page. The difference is that if possible, it will pull the rendered html from a cache, instead of evaluating it again.

For more information, see Section 3.4.1, "Keywords Versus Functions."

Type and Usage

Parameters

Takes three required parameters and two optional parameters. For example:

cacheInclude(includeName, scope, lifeSpan [, cacheName, key]) 
Parameter Description

includeName

The name of the dynamic html element to evaluate.

scope

Set to 'session' if each user should see different html, or 'application' if all users will see the same thing.

lifeSpan

The lifespan of this include in the cache, in seconds.

cacheName

Optional: if you want to place this data into a named cache instead of the default cache. If an empty string is passed, it will cache the include into the default cache for the session.

key

Optional: if you do not want automatic name-scoping of your cache to prevent conflicts, you can specify a unique key here.


Example

This will cache the std_page_begin include for each user for ten minutes. This is about 10k per user in the cache.

<$cacheInclude("std_page_begin", "session", 600)$> 

See Also


captionEntryWidth

Specifies the width of a metadata field, in percent.

Type and Usage

Output

Returns the width of the current metadata field in percent.

Example

Used as script:

<$if isInfo$>
    <$captionFieldWidth="30%"$>
    <$captionEntryWidth="70%"$>
<$elseif isEditMode$>
    <$captionFieldWidth="20%"$>
    <$captionEntryWidth="80%"$>
<$endif$>

See Also


captionFieldWidth

Specifies the width of a metadata field caption, in percent.

Type and Usage

Output

Returns the width of the current metadata field caption in percent.

Example

Used as script:

<$if isInfo$>
    <$captionFieldWidth="30%"$>
    <$captionEntryWidth="70%"$>
<$elseif isEditMode$>
    <$captionFieldWidth="20%"$>
    <$captionEntryWidth="80%"$>
<$endif$>

See Also


clearSchemaData()

Clears the data from a schema ResultSet.

Type and Usage

Parameters

This function can take zero, one, or two parameters.

Example

<$clearSchemaData()$>

See Also


ClientControlled

Checks if the page was accessed from the ODMA Client.

This value is passed by the string for controlling the update process that is provided by the client.

Type and Usage

Output

Example

Checks if the page was accessed from the ODMA Client:

<$ClientControlled$>

See Also


computeDocUrl()

This function computes the URL to a content item based on the data on the page.

For example, this function can be called to generate a URL to an item when looping over a ResultSet of items.

The following information must be present on the page:

Type and Usage

Parameters

The only parameter indicates if the URL is relative, set to TRUE (1) or FALSE (0).


computeRenditionUrl()

Returns the URL of a given rendition.

Type and Usage

Parameters

Takes three parameters:

Output

Returns the complete URL of the rendition as a string.

Example

Returns the URL of the rendition as a string.

<$computeRenditionUrl(url, dRevLabel, dRendition1)$>

CONTENT_LENGTH

Retrieves the length in bytes of the requested content item as supplied by the client.

This variable is specific to the current gateway program request.

Important:

This setting is obsolete for Content Server version 7.0 and later. The web server filter no longer sends this information.

Type and Usage

Output

Returns the content length in bytes.

Example

As information output on a page or to a log:

CONTENT_LENGTH=0

As part of an Idoc Script statement or evaluation:

<$if CONTENT_LENGTH$>
<!--statement-->

coreContentOnly

Set this variable in the URL of a service request to display only the form. The std_page_begin and std_page_end include files will not be displayed.

Type and Usage

Output

None.


CURRENT_DATE

Returns the current date and time.

This variable is similar to dateCurrent, which is used more frequently.

Type and Usage

Output

Returns a string formatted according to the user locale.

Example

Used as script:

<$CURRENT_DATE$>

See Also


CURRENT_ROW

Evaluates which row of a ResultSet you are in.

The first row in a ResultSet is row zero (0).

Type and Usage

Output

Returns the row number.

Example

Used as script:

<$CURRENT_ROW$>

dateCurrent()

Returns the current date and time.

Can be used to return the current date and time to the user or to create commands using date evaluations.

Type and Usage

Parameters

The only optional parameter is an integer, which adjusts the date by the specified number of days relative to the current date.

Output

Returns a date formatted according to the user locale.

Example

In the following examples, dates are formatted according to the default English-US locale:

m/d/yy h:mm XM

The following returns the current date and the current time (for example, 8/12/01 1:55 PM):

<$dateCurrent()$>

Returns the date ten days in the future and the current time (for example, 8/22/01 1:55 PM):

<$dateCurrent(10)$>

Returns the date ten days in the past and the current time (for example, 8/2/01 1:55 PM):

<$dateCurrent(-10)$>

See Also


dcShowExportLink

This function verifies if the Dynamic Converter has been configured to convert a content item. The returned value is based on the value for dFormat for the item.

This function is typically used on Search Result pages to conditionally display a Dynamic Converter link.

Type and Usage

Output

Example

<$QueryText = "dDocTitle <substring> `test`"$>
<$executeService("GET_SEARCH_RESULTS")$>
<$loop SearchResults$>
    <$if dcShowExportLink()$>
        <a href="<$HttpCgiPath$>?IdcService=
        GET_DYNAMIC_CONVERSION&dID=<$dID$>">
        HTML Conversion of <$dDocTitle$></a>
    <$endif$>
<$endloop$>

ddAppendIndexedColumnResultSet()

This function loads a dynamicdata table into a ResultSet. It is very similar to ddLoadIndexedColumnResultSet. The main difference is that if the Idoc Script ResultSet already exists, the new ResultSet created from the dynamicdata table is appended to it. Any fields found in the dynamicdata table, but not in the target ResultSet, are automatically added.

Type and Usage

Parameters

The following table lists parameters for this function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be appended.

indexColumn

The name of an indexed column in the dynamicdata table.

indexValue

The value to use to select a section of the original table. This value will be checked in a case-insensitive manner against the indexColumn value in each row. If it matches, that row is loaded into the ResultSet; otherwise, it is skipped.

mappingTableName

The name of a dynamicdata table used to rename the columns of the final ResultSet. The renaming is done by mapping the column names in the specified mapping table to the values of the first row in the same table. This is done exactly the same in ddLoadResultSet.


Output

If the dynamicdata table is successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
<?commatable indexedColumns="fieldA"?>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
1,      3,       9
<@end@>


<$exec rsCreateResultSet("MyResultSet", "fieldA,fieldB")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "first value"$>
<$MyResultSet.fieldB = "second value"$>
<$exec ddLoadIndexedColumnResultSet("MyDataTable", "MyResultSet", "fieldA", "1")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.fieldB$>    [[% (foo == 'second value') %]]<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.fieldC$>    [[% (bar == '3') %]]

See Also


ddAppendResultSet()

This function loads a dynamicdata table into a ResultSet. It is very similar to ddLoadResultSet. The main difference is that if the Idoc Script ResultSet already exists, the new ResultSet created from the dynamicdata table is appended to it. Any fields found in the dynamicdata table, but not in the target ResultSet, are automatically added.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be appended.

mappingTableName

The name of a dynamicdata table used to rename the columns of the final ResultSet. The renaming is done by mapping the column names in the specified mapping table to the values of the first row in the same table. This is done exactly the same in ddLoadResultSet.


Output

If the dynamicdata table is successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
field1, field2, field3
a,      b,       c
d,      e,       f
<@end@>


<$exec rsCreateResultSet("MyResultSet", "field1,field2")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.field1 = "first value"$>
<$MyResultSet.field2 = "second value"$>
<$exec ddAppendResultSet("MyDataTable", "MyResultSet")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.field1$>    [[% (foo == 'first value') %]]
<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.field3$>    [[% (bar == 'c') %]]

See Also


ddApplyTableSortToResultSet()

This function sorts an existing ResultSet using the rules defined in a particular dynamicdata table.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to use for its sorting rules.

resultSetName

The name of the ResultSet into which the dynamicdata table should be appended.


Output

If the sorting is successfully performed, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
<?commatable sortcolumn="order" sortType="int" sortOrder="asc"?>
user,    service,            order
jane,    DOC_INFO,           10
bob,     GET_SEARCH_RESULTS, 20
annette, CHECKIN_NEW,        30
<@end@>


<$exec rsCreate("MyResultSet")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.user = "james"$>
<$MyResultSet.service = "GET_FILE"$>
<$MyResultSet.order = 75$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.user = "zoe"$>
<$MyResultSet.service = "DOC_INFO_BY_NAME"$>
<$MyResultSet.order = 20$>
<$exec ddApplyTableSortToResultSet("MyDataTable", "MyResultSet")$>

ddGetFieldList()

This function takes a dynamicdata table and returns a comma-separated string containing the names of the columns in the table. It is expected that many dynamicdata tables consist only of field names without any rows just to supply comma-separated lists of values to code in the Content Server system.

Type and Usage

Parameters

This function has one parameter, dataTableName, which is the name of the dynamicdata table to load.

Output

If the dynamictable exists, it returns True.

Example

<@dynamicdata MyDataTable@>
foo,bar,baz
<@end@>


<$fieldList = ddGetFieldList("MyDataTable")$>
<$trace(fieldList, "#console")$> [[% Outputs: foo,bar,baz %]]

ddIncludePreserveValues()

This function executes a resource include, but protects values specified by a dynamicdata table from being changed. The column names in the data table are used as the list of variables names that must be protected. These variables are protected by temporarily caching them, calling the include, and then resetting those variables back to the cached values. If a variable was null, it is set to blank.

If one of the column names in the table starts with a dollar symbol ($), then the string that follows is assumed to be the name of a ResultSet. In that case, it is the pointer to the ResultSet that is temporarily cached in memory and then replaced after the resource include has finished executing. If the ResultSet did not exist at the time of caching, then any ResultSet that exists with that key at the end are removed. If the ResultSet is active at the time it has its pointer cached, new ResultSets of the same name can be created during the call of the include and the previously active ResultSet will be recovered appropriately without disturbing the loop. The one side effect is that if a new ResultSet is created that temporarily replaces the active ResultSet, then the algorithm for variable substitution that retrieves values first from active ResultSets can find values for a variable from the cached active ResultSet (assuming the variable is not found as a field in an active ResultSet with higher precedence). The cached active ResultSet maintains its place in the active ResultSet stack,

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

includeName

The name of the resource include to execute.

dataTableName

The name of the dynamicdata table to use for preserving local data and ResultSets.


Output

A string representing the output of the executed resource include.

Example

<@dynamicdata MyPreservedFields@>
foo, bar, $baz
<@end@>


<@dynamichtml my_include@>
    <$foo = "tempValue1"$>
    <$bar = "tempValue2"$>
<@end@>


<$foo = 5$>
<$ddIncludePreserveValues("my_include", "MyPreservedFields")$>
<$trace(foo, "#console")$>   [[% Outputs: 5 %]]

ddLoadIndexedColumnResultSet()

This function loads a dynamicdata table into a ResultSet. This function is similar to ddLoadResultSet except that it only loads those rows whose values for indexColumn match indexValue. The comparisons made on this column are case-insensitive.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be loaded.

indexColumn

The name of an indexed column in the dynamicdata table.

indexValue

The value to use to select a section of the original table. This value will be checked in a case-insensitive manner against the indexColumn in each row. If it matches, that row is loaded into the ResultSet; otherwise, it is skipped.

mappingTableName

The name of a dynamicdata table used to rename the columns of the final ResultSet. The renaming is done by mapping the column names in the specified mapping table to the values of the first row in the same table. This is done exactly the same in ddLoadResultSet.


Output

If the dynamicdata table is successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
<?commatable indexedColumns="fieldA"?>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
1,      3,       9
<@end@>


<$exec ddLoadIndexedColumnResultSet("MyDataTable", "MyResultSet", "fieldA", "1")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.fieldB$>    [[% (foo == '2') %]]
<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.fieldC$>    [[% (bar == '9') %]]

See Also


ddLoadResultSet()

This function loads a dynamicdata table into a ResultSet.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be loaded.

mappingTableName

The name of a dynamicdata table used to rename the columns of the final ResultSet. The renaming is done by mapping the column names in the specified mapping table to the values of the first row in the same table. This is done exactly the same in ddLoadIndexedColumnResultSet.


Output

If the dynamicdata table is successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
1,      3,       9
<@end@>


<$exec ddLoadResultSet("MyDataTable", "MyResultSet")$>
<$exec ddLoadResultSet("MyDataTable", "MyAliasedResultSet")$>
<$exec rsFirst("MyResultSet")$>
<$exec rsFirst("MyAliasedResultSet")$>
<$foo = MyResultSet.field1$>         [[% (foo == 'a') %]]
<$bar = MyAliasedResultSet.alias2$>  [[% (bar == 'c') %]]

See Also


ddMergeIndexedColumnResultSet()

This function merges a dynamicdata table into a ResultSet. This function is similar to ddMergeResultSet except that it only merges those rows whose values for indexColumn match indexValue. The comparisons made on this column are case-insensitive.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be merged.

indexColumn

The name of an indexed column in the dynamicdata table.

indexValue

The value to use to select a section of the original table. This value is checked in a case-insensitive manner against the indexColumn in each row. If it matches, that row is loaded into the ResultSet; otherwise it is skipped.

mergeType

The type of merge to perform. Set this to replace to prevent the merge from appending any new rows. Any other value for this parameter is treated as append.

mappingTableName

The name of a dynamicdata table which should be used to rename the columns of the final ResultSet. This renaming is done by mapping the column names in this mapping table to the values of the first row in this same table. This is done exactly as it is done in ddLoadResultSet.


Output

If the dynamicdata table is successfully merged, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
1,      3,       9
<@end@>


<$exec rsCreateResultSet("MyResultSet", "fieldA,fieldB,fieldC")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "4"$>
<$MyResultSet.fieldB = "8"$>
<$MyResultSet.fieldB = "23"$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "8"$>
<$MyResultSet.fieldB = "21"$>
<$MyResultSet.fieldB = "59"$>
<$exec ddMergeIndexedColumnResultSet("MyDataTable", "MyResultSet", "fieldA", "4", "replace")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.fieldB$>    [[% (foo == '5') %]]
<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.fieldC$>    [[% (bar == '59') %]]

See Also


ddMergeResultSet()

This function merges a dynamicdata table into an existing ResultSet. If the target ResultSet does not exist, then this function acts exactly like ddLoadResultSet and the target ResultSet is simply created. Otherwise, the merge is performed using the first column of the new ResultSet as the merge key. By default, the merge appends any rows from the new ResultSet that do not match any rows in the existing Idoc Script table, unless the mergeType parameter is set to replace, in which case no new rows are added to the Idoc Script ResultSet.

Note that this merge does not replace all rows matched by a particular row of the new ResultSet, just the first one that it finds. The matching is case-sensitive. The mergeType parameter is optional and defaults to null.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be merged.

mergeType

The type of merge to perform. Set this to replace to prevent the merge from appending any new rows. Any other value for this parameter is treated as append.

mappingTableName

The name of a dynamicdata table which should be used to rename the columns of the final ResultSet. This renaming is done by mapping the column names in this mapping table to the values of the first row in this same table. This is done exactly as it is done in ddLoadResultSet.


Output

If the dynamicdata table is successfully merged, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
<@end@>


<$exec rsCreateResultSet("MyResultSet", "fieldA,fieldB,fieldC")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "4"$>
<$MyResultSet.fieldB = "52"$>
<$MyResultSet.fieldC = "18"$>
<$exec ddMergeResultSet("MyDataTable", "MyResultSet", "replace")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.fieldB$>    [[% (foo == 52) %]]
<$bar = MyResultSet.#numRows$>  [[% (bar == 1) %]]

See Also


ddMergeUsingIndexedKey()

This function pulls selective rows from a dynamicdata table and use them to replace particular row values in a target ResultSet. The values of a particular column in the target ResultSet are used as values for an index look up into the dynamicdata table. The subtable retrieved is used to replace column values in the target ResultSet that have matching column names. The dynamicdata table is assumed to have only one row in the subtable selected out by the index value. If it has more than one row, only the first row is used to merge in values into the target ResultSet.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

idocTableName

The name of the ResultSet into which the dynamicdata table should be merged.

indexColumn

The name of an indexed column in the dynamicdata table and the name of the column in the target ResultSet from which values are retrieved to select out subtables in the dynamicdata table.

mappingTableName

The name of a dynamicdata table which should be used to rename the columns of the final ResultSet. This renaming is done by mapping the column names in this mapping table to the values of the first row in this same table. This is done exactly as it is done in ddLoadResultSet.


Output

If the dynamicdata table is successfully merged, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
<?commatable indexedColumns="fieldA"?>
fieldA, fieldB, fieldC
1,      2,       3
4,      5,       6
7,      8,       9
<@end@>


<$exec rsCreateResultSet("MyResultSet", "fieldA,fieldB,fieldC")$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "4"$>
<$MyResultSet.fieldB = "8"$>
<$MyResultSet.fieldB = "23"$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "7"$>
<$MyResultSet.fieldB = "20"$>
<$MyResultSet.fieldB = "41"$>
<$exec rsAppendNewRow("MyResultSet")$>
<$MyResultSet.fieldA = "8"$>
<$MyResultSet.fieldB = "21"$>
<$MyResultSet.fieldB = "59"$>
<$exec ddMergeIndexedColumnResultSet("MyDataTable", "MyResultSet", "fieldA")$>
<$exec rsFirst("MyResultSet")$>
<$foo = MyResultSet.fieldB$>    [[% (foo == '5') %]]
<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.fieldC$>    [[% (bar == '9') %]]
<$exec rsNext("MyResultSet")$>
<$bar = MyResultSet.fieldC$>    [[% (bar == '59') %]]

ddSetLocal()

This function takes a dynamicdata table and iterates over it, setting local data values for each row. The first column of the table is used as the list of keys, while the second column is used as the list of values.

Type and Usage

Parameters

This function has one parameter, dataTableName, which is the name of the dynamicdata table to load.

Output

If the dynamicdata table exists, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
key, value
foo, 15
bar, 23
baz, 77
<@end@>


<$exec ddSetLocal("MyDataTable")$>
<$tmp1 = #local.foo$>   [[% (tmp1 == '15') %]]
<$tmp2 = #local.bar$>   [[% (tmp2 == '23') %]]
<$tmp3 = #local.baz$>   [[% (tmp3 == '77') %]]

See Also


ddSetLocalByColumnsFromFirstRow()

This function takes the first row of a dynamicdata table and, using the column names as keys, sets a local value for each column and its corresponding value. If there is no first row, then this function does nothing. This can be a useful method for quickly setting a lot of local values. The filterInclude and includeColumns properties of the dynamicdata table are ignored.

Type and Usage

Parameters

This function has one parameter, dataTableName, which is the name of the dynamicdata table to load.

Output

If the dynamicdata table was successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
fieldA, fieldB, fieldC
foo,    bar,    baz
<@end@>


<$exec ddSetLocalByColumnsFromFirstRow("MyDataTable")$>
<$tmpStr1 = #local.fieldA$>   [[% (tmpStr1 == 'foo') %]]
<$tmpStr2 = #local.fieldC$>   [[% (tmpStr2 == 'baz') %]]

See Also


ddSetLocalByColumnsFromFirstRowIndexed()

This function takes the first row of a dynamicdata table, and, using the column names as keys, sets a local value for each column and its corresponding value. If there is no first row, then this function does nothing. This function is almost identical to ddSetLocalByColumnsFromFirstRow. The only difference is that this function uses the first row given an indexed column and value instead of the very first row of the dynamicdata table. If no indexed row is found then this function does nothing.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

dataTableName

The name of the dynamicdata table to load.

indexColumn

The name of an indexed column in the dynamicdata table.

indexValue

The value to use to select a row of the original table. This value will be checked in a case-insensitive manner against the indexColumn in each row. If it matches, that row will be used and the rest of the table will be ignored.


Output

If the dynamicdata table is successfully loaded, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
<?commatable indexedColumns="fieldB"?>
fieldA, fieldB, fieldC
1,      2,      3
4,      5,      6
7,      8,      9
3,      5,      2
<@end@>


<$exec ddSetLocalByColumnsFromFirstRowIndexed("MyDataTable", "fieldB", 5)$>
<$tmpStr1 = #local.fieldA$>   [[% (tmpStr1 == '4') %]]
<$tmpStr2 = #local.fieldC$>   [[% (tmpStr2 == '6') %]]

See Also


ddSetLocalEmpty()

This function takes a dynamicdata table and iterates over it, clearing local data. The first column is used as the keys to clear.

Type and Usage

Parameters

This function has one parameter, dataTableName, which is the name of the dynamicdata table to use.

Output

If the dynamicdata table exists, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
key
foo
bar
baz
<@end@>


<$foo = 1$>
<$bar = 2$>
<$baz = 3$>
<$exec ddSetLocalEmpty("MyDataTable")$>
<$if foo or bar or baz$>
    [[% This will not be executed as foo, bar, and baz are all empty. %]]
<$endif$>

See Also


ddSetLocalEmptyByColumns()

This function takes a dynamicdata table and uses the columns to clear values in local data.

Type and Usage

Parameters

This function has one parameter, dataTableName, which is the name of the dynamicdata table to use.

Output

If the dynamicdata table exists, it returns TRUE.

Example

<@dynamicdata MyDataTable@>
foo, bar, baz
<@end@>


<$bar = "asdf"$>
<$exec ddSetLocalEmptyByColumns("MyDataTable")$>
<$if bar$>
    [[% This will not execute as bar will be empty. %]]
<$endif$>

See Also


DefaultAccounts

Defines the default accounts for anonymous users.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

As a configuration setting, defines default account information:

DefaultAccounts=BOS(R),SEA(RW),MSP/Gen(RWD)

As Idoc Script, returns the account information as a string:

<$DefaultAccounts$>

See Also


defaultFieldInclude

Specifies the include to use to display the metadata field.

Type and Usage

Example

Sets the default field-display include for a hidden field on a query page to std_query_hidden_field:

<$if isFieldHidden$>
    <$if isQuery and not (fieldType like "Date") and not (fieldType like "Int")$>
        <$defaultFieldInclude = "std_query_hidden_field"$>
    <$endif$>

See Also


defaultOptionListScript

Defines a piece of Idoc Script that displays a standard option list field.

Type and Usage

Output

None.

Example

Generates an option list using the optList function:

<$if optionsAllowPreselect and fieldValue$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":fieldValue$>"$>
<$else$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":noselected$>"$>
<$endif$>

Loops on the current option list ResultSet to generate an option list:

<@dynamichtml compute_resultset_option_list_script@>
<$if not optionListKey$>
    <$optionListKey = fieldName$>
<$endif$>
<$defaultOptionListScript = "<$loop " & optionListResultSet & "$>" & "<$inc('std_resultset_option_list_item')$>" & "<$endloop$>"$>
<@end@>

See Also


DelimitedUserRoles

Retrieves a comma-delimited, colon-delimited list of roles the current user belongs to.

Type and Usage

Output

Returns the user role list as a string.

Example

Returns a list of roles formatted as follows:

:guest:,:PublicContributor:,:ClassifiedConsumer:

See Also


docLoadResourceIncludes()

Loads all the includes in a specified content item for use in the display of the current page.

Type and Usage

Parameters

Takes a CGI-encoded parameter list that specifies a content item that is checked into the Content Server system. The parameter options are listed in the following table.

Optional Parameters Description

dID

If dID is not present, dDocName and RevisionSelectionMethod must be present. A rendition of the revision of the content item with this ID will be returned, if it exists, and the RevisionSelectionMethod parameter does not exist or has the value Specific.

dDocName

It is recommended that dDocName be present in all requests for content items where the dDocName is known. Error messages assume that it is present, as do other features such as forms.

  • If dDocName is not present, dID must be present and RevisionSelectionMethod must not be present.

  • If RevisionSelectionMethod is present, a rendition of a revision of the content item with this name with be returned, if it exists.

  • If RevisionSelectionMethod is not present, dDocName may be used in error messages.

RevisionSelectionMethod

If present, dDocName must be present. The value of this variable is the method used to compute a dID from the specified dDocName. The value may be Specific, Latest, or LatestReleased.

  • Specific: The dDocName is ignored, dID is required and is used to get a specific revision.

  • Latest: The latest revision of the content item (including revisions in a workflow) is used to compute the dID.

  • LatestReleased: The latest released revision of the content item is used to compute the dID.

Rendition

  • If not present, Rendition defaults to Primary. This parameter specifies the rendition of the content item.

  • If the value is Primary, Web, or Alternate, the primary, web-viewable, or alternate rendition of the selected revision is returned.


Note:

When used in HCSP pages, the ampersand (&) character in the CGI-encoded parameter list must be changed to the &amp; character.

Output

None.

Example

Loads the resource includes in the primary vault rendition of the latest revision of mydoc.

<$docLoadResourceIncludes("dDocName=mydoc&RevisionSelectionMethod=Latest")$>

See Also


docRootFilename()

Retrieves the file name of a file without the extension or directory path.

Type and Usage

Parameters

Takes one parameter:

Output

Returns the file name as a string.

Example

Returns the value mydoc:

docRootFilename("/groups/public/documents/adacct/mydoc.pdf")

DocTypeSelected

Evaluates whether the Type of the current content item matches the Type in the active ResultSet.

Type and Usage

Output

Example

Returns value based on whether the content item type matches the type for the ResultSet.

<$DocTypeSelected$>

DocUrl

Retrieves the URL of the file in the weblayout/ directory. This variable is evaluated once per content item, not once per service call.

Type and Usage

Output

Returns the URL of the file as a string.

Example

Used to build URL links to content items.

<$if HasUrl$>
    <a href="<$DocUrl$>"><$dDocName$></a>
<$else$>
    <$dDocName$>
<$endif$>

docUrlAllowDisclosure()

Evaluates whether a URL can be disclosed to the current user.

Type and Usage

Parameters

The only parameter is an absolute path, such as the following:

http://mycomputer/domain/groups/.../documents/mydoc.pdf

A full relative path can be used, such as the following:

/oracle/domain/.../documents/mydoc.pdf).

Output

Returns a Boolean value.

Example

Determines if the user can view the URL of the mydoc.pdf document.

<$docUrlAllowDisclosure("/domain/groups/documents/mydoc.pdf")$>

DownloadApplet

Enables the multiple file Download Applet.

Type and Usage

Location

Example

As a configuration setting, enables the Download Applet:

DownloadApplet=true

As script, evaluates the condition of the Download Applet:

<$DownloadApplet$>

See Also


DownloadSuggestedName

Retrieves the default path and suggested name for a file being downloaded.

The suggested name is based on the original file name of the content item.

Type and Usage

Output

Returns the path and suggested name for the downloaded file as a string.

Example

Returns the path and suggested name for the downloaded file:

<$DownloadSuggestedName$>

dpGet()

Function used to return the value set by the dpSet function.

Both dpGet and dpSet are used to control the logic of Content Profile rules that are to be displayed. Commonly, a user may create an activation condition that sets a value for a specified key. Even if the condition evaluates to false (that is, the rule fails to fire), the key is set. Another rule can now access the key and retrieve the value when evaluating its activation condition. By using these two functions, a user can create a dependency between rules. For example, a user may want a rule to be evaluated only when a preceding rule is evaluated.

Type and Usage

Parameters

Takes one parameter:

Example

<$myValue = dpGet("myKey")$>

See Also


dpPromote()

Function used to 'promote' values from a rule evaluation context into the request context. After the evaluation of all rules, the key and value specified by this function are pushed into the local data.

Type and Usage

Parameters

Takes two parameters:

Example

This example changes the value for AutoNumberPrefix for one request to be the value for dDocType:

<$dpPromote("AutoNumberPrefix", dDocType)$>

This example causes the Title field to be hidden on checkin pages:

<$dpPromote("dDocTitle:isHidden", "1")$>

See Also


dpPromoteRs()

Similar to dpPromote, this function allows a ResultSet that is generated in a profile rule to be promoted to the request context. The ResultSet is pushed into the DataBinder after the evaluation of all rules. The values are not evaluated during rule activation or manipulation but are available for page presentation.

Type and Usage

Parameters

This function can take two parameters:

See Also


dpSet()

Function used to set temporary values during the evaluation of activation conditions or rule values anywhere Idoc Script is evaluated.

The values are set into a working area and can be retrieved by the dpGet function call. The key and value that is set does not persist, but is globally available for the profile being evaluated. All key/value pairs can be accessed by the rules of the profile.

Both dpGet and dpSet are used to control the logic of Content Profile rules that are to be displayed. Commonly, a user may create an activation condition that sets a value for a specified key. Even if the condition evaluates to false (that is, the rule fails to fire), the key is set. Another rule can now access the key and retrieve the value when evaluating its activation condition. By using these two functions, a user can create a dependency between rules. For example, a user may want a rule to be evaluated only when a preceding rule is evaluated.

Type and Usage

Parameters

This function takes two parameters:

Example

<$dpSet("myKey", "1")$>

See Also


dWfName

Retrieves the name of the workflow.

Type and Usage

Output

Returns the name of the workflow as a string.

Example

The following code in the IdcHomeDir/resources/core/templates/workflow_info.htm template page is used to display the workflow name on the Workflow Step Information page:

<td align=right><span class=infoLabel><$lc("wwLabelWorkflow")$></span></td>
<td><span class=tableEntry><$dWfName$></span></td>

dWfStepName

Retrieves the name of the current step in the workflow.

Type and Usage

Output

Returns the name of the current step as a string.

Example

The following code in the IdcHomeDir/resources/core/templates/workflow_info.htm template page is used to display the current step name on the Workflow Step Information page:

<td align=right><span class=infoLabel><$lc("wwCurrentStep")$>
</span></td>
<td><span class=tableEntry>
    <$loop WorkflowStep$>
    <$dWfStepName$>
    <$exec RequiredUsers = dWfStepWeight$>
    <$if isTrue(dWfStepIsAll)$><$exec RequiredUsers = 0$><$endif$>
    <$endloop$></span>
</td>

EmptyAccountCheckinAllowed

Checks if an account must be specified on the checkin page.

Used on the Standard Page Resources page to display an error message if an account is not specified.

Type and Usage

Output

Example

Evaluates whether an account number is required and displays an error message.

<$if not EmptyAccountCheckinAllowed$>
    <$isRequired = 1, requiredMsg = "Please specify an account."$>
<$endif$>

EnableDocumentHighlight

Enables highlighting of full-text search terms in PDF, text, and HTML files.

Type and Usage

Location

Example

As a configuration setting:

EnableDocumentHighlight=false

As script, returns the value of the configuration setting:

<$EnableDocumentHighlight$>

See Also


encodeHtml()

Idoc function used to filter data input for illegal or corruptive HTML constructs. This function is used by default in Threaded Discussions, a component available during installation.

All input data received by Content Server when using the unsafe value for the rule parameter applies only to well-known unsafe script tags. This functionality can be altered by using the HtmlDataInputFilterLevel configuration variable to change the filtering that is done.

Type and Usage

Parameters

Takes two required and one optional parameter:

Output

Returns the encoded string.

See Also


entryCount

Retrieves the number of times the current workflow step has been entered by the current revision.

Type and Usage

Output

Returns the entry count as an integer.

Example

The following code defines a jump called MaxEntry, which exits to the parent workflow and notifies the reviewers if the last time the step was entered was more than one week ago:

<$if wfCurrentGet("entryCount")==2$>
    <$wfSet("WfJumpName","MaxEntry")$>
    <$wfSet("WfJumpTargetStep",wfExit(0,0))$>
    <$wfSet("WfJumpEntryNotifyOff","0")$>
<$endif$>

eval()

Evaluates a variable definition as if it were Idoc Script. Can be used to recursively evaluate a literal string.

Type and Usage

Parameters

The only parameter is a variable that defines a string to be evaluated as Idoc Script.

Output

Returns the parameter string, with any Idoc Script in the variable definition resolved.

Example

Variable one is assigned the string CompanyName, and variable two is assigned a string that includes variable one within Idoc Script delimiters. On a page, variable one presents the string CompanyName, variable two presents the string Welcome to <$one$> and eval(two) presents the string Welcome to CompanyName.

<$one="CompanyName"$>
<$two="Welcome to <$one$>"$>
<$one$><br>
<$two$><br>
<$eval(two)$>

Say you wanted to exclude all metadata fields that have the prefix xPrefix in their names. You could use the eval() function to dynamically write and evaluate Idoc Script for this purpose:

<$loop DocMetaDefinition$>
<$if strIndexOf("xPrefix", dName) >= 0$>
    <$myScript = "<$" & dName & ":isExcluded=1$>"$>
    <$eval(myScript)$>
<$endif$>
<$endloop$>

See Also


ExclusiveCheckout

Determines whether users can check out content that was authored by another user.

Type and Usage

Location

Example

As a configuration setting, only original contributor can check out a content item.

ExclusiveCheckout=true

As Idoc Script, returns the value of the configuration setting:

<$ExclusiveCheckout$>

See Also


exec

Executes an Idoc Script expression and suppresses the output (does not display the expression on the page).

Type and Usage

Parameters

The only parameter is an Idoc Script expression.

Output

Returns the value of the expression, but does not display the expression on the page.

Example

Evaluates the inc global function to incorporate the specified includes without displaying their code on the page:

<@dynamichtml std_definitions@>
    <$exec inc("std_page_variable_definitions")$>
    <$exec inc("define_image_files")$>
<@end@>

See Also


executeService()

Executes a Content Server service.

Type and Usage

Parameters

The only parameter is the name of the service to be executed. The live data in the DataBinder is used as parameters to the specified service.

Output

Example

Executes a service when given a service name:

<$executeService("servicename")$>

See Also


ExternalUserAccounts

Retrieves the default roles for users who are defined by an external user base (NTLM, Active Directory, or LDAP).

Type and Usage

Output

Example

As script, returns the default account information as a string:

<$ExternalUserAccounts$>

See Also


ExternalUserRoles

Retrieves the default roles for users who are defined by an external user base (NTLM, Active Directory, or LDAP).

Type and Usage

Output

Example

As script, returns the default role information as a string:

<$ExternalUserRoles$>

See Also


fieldCaption

Specifies the caption label for a metadata field.

Type and Usage

Output

Returns the caption of the metadata field as a string.

Example

Defines the caption for the dDocTitle metadata field as the wwTitle localized string:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1, fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>

fieldCaptionInclude

Specifies the include to use to display the caption for the metadata field.

Type and Usage

Output

None.

Example

Sets the caption display include to std_field_caption:

<$fieldCaptionInclude = "std_field_caption"$>

See Also


fieldCaptionStyle

Specifies the style of the caption for the metadata field.

The following SPAN styles are typically used for captions. They are defined in the std_style_declaration include in the IdcHomeDir/resources/core/std_page.htm resource file:

Type and Usage

Output

Returns the name of the caption style.

Example

Sets the caption style to requiredField:

<$if isRequired and not suppressCaptionHighlighting$>
    <$fieldCaptionStyle = "requiredField"$>
<$endif$>
Generates the standard field caption:
<@dynamichtml std_field_caption@>
    <span class=<$fieldCaptionStyle$>><$fieldCaption$><$if not     isFormSubmit$><$":"$><$endif$></span>
<@end@>

See Also


fieldDefault

Specifies the default value for a metadata field.

Type and Usage

Output

Returns the default value of the metadata field as a string.

Example

Defines the default value for the dDocTitle metadata field:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1,
     fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle"),
     fieldDefault="Enter a Title"$>

fieldEditWidth

Specifies the character width of the metadata input field on the HTML page. It is set in compute_namevalue_edit_widths, which is included in the resource compute_std_field_includes.

Type and Usage

Output

None.


fieldEntryInclude

Specifies the include to use to display the value for the metadata field.

Type and Usage

Example

Sets the value display include to std_checkbox_entry:

<$fieldEntryInclude = "std_checkbox_entry"$>

See Also


fieldExtraScriptInclude

Specifies the name of the include file containing additional JavaScript validation for a specific metadata field. This is set in the resource compute_std_field_includes.

Type and Usage


fieldInclude

Specifies the name of the include to display a metadata field. The include file is usually std_namevalue_field, but it can be set to another include.

This is usually set at the top of the page with xFieldName:include but can also be set by overriding the resource compute_std_field_includes.

Type and Usage


fieldIsOptionList

Specifies whether a metadata field has an option list.

Type and Usage

Output

Example

Defines the dDocAccount metadata field as an option list if predefined accounts exist:

<$if HasPredefinedAccounts$>
    <$fieldIsOptionList = 1, optionListName = "docAccounts", 
    fieldOptionListType = "combo"$>
<$endif$>

See Also


fieldMaxLength

Specifies the maximum length of the metadata field. This is not the size of the field but the maximum number of characters that the field can contain. It is usually set at the top of the page with xFieldName:include but can also be set by overriding the resource compute_std_field_includes.

Type and Usage


fieldName

Specifies the internal name of a metadata field.

Type and Usage

Output

Returns the name of the metadata field as a string.

Example

Defines the dDocTitle metadata field:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1, fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>

fieldOptionListType

Specifies the type of option list for a metadata field.

Possible values for this variable are:

fieldOptionListType Value Corresponding Option in Configuration Manager

strict

Select List Validated or Select List Not Validated

combo

Edit and Select List

multi

Edit and Multiselect List

access

None (Used in Collaboration Server for member access lists)


Type and Usage

Output

Returns the option list type as a string.

Example

Defines the dDocAccount option list type as combo (Edit and Select List):

<$if HasPredefinedAccounts$>
    <$fieldIsOptionList = 1, optionListName = "docAccounts",
    fieldOptionListType = "combo"$>
<$endif$>

See Also


fieldType

Specifies the type of metadata field.

Possible values for this variable are:

fieldType Value Corresponding Option in Configuration Manager

Text

Text

BigText

Long Text

Int

Integer

Date

Date

Memo

Memo


Type and Usage

Output

Returns the metadata field type as a string.

Example

Defines the dDocTitle metadata field as a BigText (Long Text) field:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1,
    fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>

fieldValue

Specifies the value for a metadata field.

Type and Usage

Output

Returns the value of the current metadata field.

Example

Generates the standard field value:

<@dynamichtml std_value_label@>
    <span class="<$fieldValueStyle$>"><$fieldValue$></span><!--""-->
<@end@>

See Also


fieldValueStyle

Specifies the style of the value for the metadata field.

The following SPAN styles are typically used for values. They are defined in the std_style_declaration include in the IdcHomeDir/resources/core/std_page.htm resource file:

Type and Usage

Output

Returns the name of the value style.

Example

Sets the value style:

<$if isFieldInfoOnly$>
    <$if valueStyle$>
<$fieldValueStyle = valueStyle$>
    <$else$>
<$fieldValueStyle = "tableEntry"$>
    <$endif$>
<$endif$>

Generates the standard field value:

<@dynamichtml std_value_label@>
    <span class="<$fieldValueStyle$>"><$fieldValue$></span><!--'"-->
<@end@>

See Also


fieldWidth

Specifies the width of a metadata field, in characters.

Type and Usage

Output

Returns the width of the current metadata field.

Example

Generates the Extension field with a width of 10 characters:

<$fieldName = "dExtension", fieldCaption = lc("wwNativeExtension"), 
fieldWidth = 10$>

See Also


fileUrl

Retrieves the relative URL of the current dynamic server page (HCSP or HCST).

This variable is typically used in self-referencing pages, such as a form that posts back to itself.

Type and Usage

Output

Returns the URL as a string.

Example

Returns the relative URL of the current dynamic server page:

<$fileUrl$>

FIRSTREV

Returns the first revision label for the current revision label sequence.

Type and Usage

Output

Returns the first revision label as a string.

Example

Returns the first revision label (default is 1):

<$FIRSTREV$>

ForcedConversionRules

Defines the Dynamic Converter rules that will apply forced conversions upon file checkin.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

Used as a configuration entry:

ForcedConversionRules=Rule1,Rule2,Rule3

See Also


forceExpire()

This function can be used to force the cache for a particular include to expire. This is useful in the case of a change in the page display, such as adding new metadata fields, or if the user has saved a new query, or altered which links are viewable.

If the value for 'includeName' is null, or an empty string, then the entire cache will be eliminated. This is useful when all includes for a particular page are placed into the same cache, and need to be expired at the same time.

For more information about keywords versus functions, see Section 3.4.1, "Keywords Versus Functions."

Type and Usage

Parameters

Takes two required parameters and two optional parameters. For example:

forceExpire(includeName, scope [, cacheName, key])
Parameter Description

includeName

The name of the dynamic html element to evaluate.

scope

Set to 'session' if each user should see different html, or 'application' if all users will see the same thing.

cacheName

Optional: if you want to place this data into a named cache instead of the default cache. If an empty string is passed, it will cache the include into the default cache for the session.

key

Optional: if you do not want automatic name-scoping of your cache to prevent conflicts, you can specify a unique key here.


Example

This can be used as a replacement for the 'std_page_begin' include. It will verify if the user executed one of the standard service calls to modify the links on the standard left navigation bar (saving a query, altering the portal design). If so, the cached html for the standard page begin will be invalidated. Then, the next 'cacheInclude' function will reevaluate the include, and place it back into the cache.

<$if strEquals(IdcService, "PNE_SAVE_QUERY") or strEquals(IdcService, "PNE_UPDATE_PORTAL_INFO")$>
<$forceExpire("std_main_page_begin", "session", "", "std_main_page_begin")$>
<$endif$>
<$cacheInclude("std_main_page_begin", "session", 600, "", "std_main_page_begin")$>

See Also


formatDate()

Reformats a date/time to the default date/time format.

Database-formatted dates cannot be evaluated (for example, 2001-06-15).

Long-formatted dates cannot be evaluated (for example, June 15, 2001).

Type and Usage

Parameters

The only parameter is a string that specifies a date/time.

Output

Example

The following example formats the date and time and displays it as 12/14/99 2:00 PM:

<$formatDate("12/14/1999 02:00 PM")$>

The following example formats the date, assigns the default time, and displays it as 9/15/03 12:00 AM:

<$formatDate("09/15/2003")$>

The following script formats and displays a specified date and time. Line one evaluates an alternate date and time format and assigns it to a custom variable. Line two displays this date to a user.

<$my_customDateTime = formatDate("06/14/2004 15:05:34")$>
Final Approval: <$my_customDateTime$>

Output:

Final Approval: 6/14/04 3:05 PM


formatDateDatabase()

Formats the date and time in preparation for an SQL query. Long-formatted dates cannot be evaluated (for example, May 22, 2000).

Type and Usage

Parameters

The only parameter is a string or variable that specifies a date and time.

Output

Example

Formats the current date and time for an SQL query:

<$formatDateDatabase(dateCurrent())$>

Formats the date and time and displays as 2001-03-19 15:32:00:

<$formatDateDatabase("03/19/2001 3:32 PM")$>

Formats the date and time and displays as 1999-04-03 00:00:00:

<$formatDateDatabase("4/3/99")$>

formatDateDisplay()

Reformats a date/time to a date/time format for display to the user. Uses the "Display Date Format" in System Properties to format the date.

Type and Usage

Parameters

The only parameter is a string that specifies a date/time.

Output

Example

<$formatDateDisplay$>

See Also


formatDateOnly()

Reformats a date/time to the default date format and strips out the time.

Database-formatted dates cannot be evaluated (for example, 2000-02-02).

Long-formatted dates cannot be evaluated (for example, June 12, 2001).

Type and Usage

Parameters

The only parameter is a string that specifies a date/time.

Output

Example

Returns the current date only (for example, 9/12/01):

<$formatDateOnly(dateCurrent())$>

Returns the date ten days in the future (for example, 9/22/01):

<$formatDateOnly(dateCurrent(10))$>

Formats the date and time and displays the date only as 1/17/00:

<$formatDateOnly("01/17/2000 2:00 PM")$>

This script displays the current date and a date 100 days in the future. Line one assigns the current date only to a custom variable. Line two assigns a date 100 days in the future to a second custom variable. Line three displays these dates to a user (for example, Start Date: 10/12/01 and End Date: 1/20/02):

<$my_startDate = formatDateOnly(dateCurrent())$>
<$my_endDate = formatDateOnly(dateCurrent(100))$>
Start Date: <$my_startDate$> and End Date: <$my_endDate$>

formatDateOnlyDisplay()

Reformats a date to a date format for display to the user. Uses the "Display Date Format" in System Properties to format the date.

Similar to formatDateDisplay but only formats the date.

Type and Usage

Parameters

The only parameter is a string that specifies a date.

Output

Example

<$formatDateOnlyDisplay$>

See Also


formatDateOnlyFull()

Reformats a date/time to the long date format and strips out the time. Database-formatted dates cannot be evaluated (for example, 2000-02-02).

This setting is deprecated for version 5.1 and later. Use formatDateWithPattern.

Type and Usage

Parameters

The only parameter is a string that specifies a date/time.

Output

Example

Returns the current date in long format:

<$formatDateOnlyFull(dateCurrent())$>

Returns the date 365 days in the future in long format (for example, September 12, 2002):

<$formatDateOnlyFull(dateCurrent(365))$>

Formats the date only and displays as June 12, 2001:

<$formatDateOnlyFull("6/12/01 3:00 PM")$>

formatDateWithPattern()

Reformats a date/time to a specified date/time pattern.

When using this variable in a program (instead of dynamic page), add !rfc to the end of the date pattern. This provides a date format that conforms to the rfc standard. If !rfc is not added, a program will try to use the locale to create the date string, but in the case of a timed update event, no locale is specified. Consequently, the output uses integers instead of strings for the day and month.

Type and Usage

Parameters

Takes two parameters:

Output

Example

Displays Wed, 5 Jul 2006 12:08:56 -0700:

<$formatDateWithPattern(dateCurrent(),"EEE, d MMM yyyy HH:mm:ss zzzz")$>

Displays 2006-07-05 14:30:33Z:

<$formatDateWithPattern(dateCurrent(),"yyyy-MM-dd HH:mm:ssZ")$>

formatTimeOnly()

Reformats a date/time to the default time format and strips out the date.

Type and Usage

Parameters

The only parameter is a string or variable that specifies a date/time.

Output

Example

Returns the current time only:

<$formatTimeOnly(dateCurrent())$>

Formats the time only and displays as 5:00 PM:

<$formatTimeOnly("2/2/99 5:00 PM")$>

Formats the time only and displays as 6:14 PM:

<$formatTimeOnly("04/21/2001 18:14:00")$>

formatTimeOnlyDisplay()

Reformats a time to a time format for display to the user. Uses the "Display Date Format" in System Properties to format the time.

Similar to formatDateDisplay but only formats the time.

Type and Usage

Parameters

The only parameter is a string that specifies the time.

Output

Example

<$formatTimeOnlyDisplay$>

See Also


GATEWAY_INTERFACE

Retrieves the revision level of the CGI specification to which this server complies. This variable is not request-specific; it is set for all requests.

Type and Usage

Output

Returns the revision level as a string in the format CGI/revision.

Example

As information output on a page or to a log:

GATEWAY_INTERFACE=CGI/1.1

As part of an Idoc Script statement or evaluation:

<$if GATEWAY_INTERFACE$>
<!--statement-->

generateUniqueId

This function returns the unique ID for an HTML page. This is used with the id attribute in an HTML element to guarantee a unique ID.

Type and Usage

Parameters

The only parameter is the field name for which the ID will be generated.

Output

Returns the ID for an HTML page.


getCookie

Obtains a cookie from a browser.

This is useful for tracking user sessions when the information does not need to be stored in the personalization.

Can be used to track the last pages navigated to, or the last searches which were run.

Type and Usage

Parameters

Takes one parameter, the name of the cookie.

Example

<$myCounter=getCookie("myCounter")$>
<$if not myCounter$>
    <$myCounter=1$>
<$endif$>
Num times loaded: <$myCounter$>
<$setCookie("myCounter", myCounter+1, dateCurrent(1))$>

See Also


GetCopyAccess

Determines what permission a user must have to get a copy of a content item.

When set to TRUE, users can get a copy of a content item for which they have only Read permission.

When set to FALSE, users must have Write permission to a content item to be able to get a copy.

Default is FALSE.

Type and Usage

Location

Example

As a configuration setting:

GetCopyAccess=true

As Idoc Script, returns the value of the configuration setting:

<$GetCopyAccess$>

getDebugTrace()

Retrieves the output of the debug trace.

Type and Usage

Output

Example

Retrieves the output of the debug trace and outputs the information to a page:

<$getDebugTrace()$>

See Also


getErrorTrace()

Retrieves the output of the error trace.

Error trace output is encoded for display in HTML pages. For example, the < and > delimiters are HTML-escaped and carriage returns are converted to <br> tags.

Type and Usage

Output

Example

Retrieves the output of the error trace and outputs the information to a page:

<$getErrorTrace()$>

See Also


getFieldConfigValue

This function returns a configuration flag for a specific field. If the field does not exist, the default is returned instead.

Type and Usage

Parameters

Takes three parameters:

Output

Returns the specified configuration flag.

Example

<$caption = getFieldConfigValue("dDocTitle", "fieldCaption", lc("wwTitle"))$>

getFieldViewDisplayValue()

Returns the display value for an item in a Schema option list.

For example, assume an option list exists for a custom metadata field named Customer. In the database there is a schema table with the CustomerName column and a unique CustomerID column. On checkin the CustomerName value is visible to the user, but the CustomerID value is stored in the database. The getFieldViewDisplayValue function extracts the human-readable CustomerName value based on the CustomerID value.

Type and Usage

Parameters

Takes three parameters:

Output

Returns the display value.

Example

<$customerName = getFieldViewDisplayValue("xCustomer", "Customer_View", "1234")$>

getFieldViewValue()

This function is used when defining a content rule for a field. The value of a field for a content profile can be made dependent on a view by using this function. Because a field can have both a default and a derived value, the view can be used to create an interdependency between fields.

Type and Usage

Parameters

Takes three parameters:

Output

Returns the value in the column specified using the field value as a lookup.

Example

In the following example, the view table for the field xEmployee has a column called type. Using the value as specified in the xEmployee metadata field, this function provides a lookup into this table and returns the type column value.

getFieldViewValue("xEmployee", #active.xEmployee, "type")

getFreeMemory()

This function returns the amount of free memory in the Java Virtual Machine (JVM). This is a performance auditing function used on the System Audit Information page.

Type and Usage

Output

The amount of free JVM memory in megabytes.

Example

<$freeMem = getFreeMemory()$>

See Also


getHelpPage

This function returns a relative URL to a help page based on the name of the page.

Type and Usage

Parameters

The name of the page used.

Example

<input type=Button value="<$lc("wwQuickHelp")$>"
    onClick="QuickHelp('<$getHelpPage("QH_AdvancedSearch")$>', 'Search')">

getOptionListSize

This function returns the size of an option list. It is used to determine whether to display custom user metadata fields on the User Profile page.

Type and Usage

Parameters

The only parameter is the option list to be sized.

Output

Returns the size of the specified option list.


getParentValue()

This function returns a parent value from a Schema view. This is needed before generating the dependent option list for the current field.

In most cases this function returns the same value as the internal parent value parameter because most option lists trigger their dependency on the unique key for the parent field. However, this is not a requirement for complex dependent choice lists.

Type and Usage

Parameters

Takes four parameters:

Example

<$parentValue=getParentValue("xState", "Country_State", "xCountry", "123")$>

getRequiredMsg()

This function is used on presentation pages to populate the Java script with the desired error message. The error message is set from the content rule user interface for a field that is designated as required. It returns a required message based on the following algorithm:

  1. The function looks for the fieldname:requiredMsg value.

  2. If the value exists, it is localized.

  3. If the value is undefined or the message is empty, the function returns the default message and does not localize it. To localize the message, the caller of the function must use the lc function on the default message before passing it to this function (getRequiredMsg).

Type and Usage

Parameters

Takes two parameters:

See Also


getTextFile()

Gets the web version of a text file and returns its contents to a string.

Type and Usage

Parameters

This function does not take parameters but uses variables on the page to determine the document's URL.

Example

<$loop SearchResults$>
    <$fullDocument=getTextFile()$>
    <h2><$dDocTitle$></h2>
    <div><$fullDocument$></div>
<$endloop$>

See Also


getTotalMemory()

This function returns the amount of total memory in the Java Virtual Machine (JVM). This is a performance auditing function used on the System Audit Information page to determine how much memory the server is using.

Type and Usage

Output

The total JVM memory in megabytes.

Example

<$totalMem = getTotalMemory()$>

See Also


getUserValue()

Retrieves the value of a user metadata field for the current user.

The parameter must refer to a column in the Users database table. Unlike the user personalization functions that have no support for global reference, information assigned to the user in the Users table can be available to the Content Server instance.

Type and Usage

Parameters

The only parameter is a user-related variable.

Output

Example

Returns the user type of the currently logged on user:

<$getUserValue('dUserType')$>

getValue()

This function has multiple uses:

Type and Usage

Parameters

Takes two parameters:

Variations

You can also use a shorthand format that returns results identical to the getValue(arg1,arg2) function. The format uses the form <$arg1.arg2$>, where arg1 and arg2 are the literal string arguments "arg1" and "arg2" to the getValue function.

Note:

Data types (local, active, and env) and ResultSet parameters must start with the # symbol.

The following parameter combinations can be used.

getValue and Shorthand Formats Description

getValue("#local",fieldName)

<$#local.fieldName$>

Retrieves the value of the specified metadata field from the local data.

getValue("#active",fieldName)

<$#active.fieldName$>

Attempts to retrieve the value of the specified metadata field from the data in the following order:

  1. Local data

  2. Active ResultSets

  3. All other ResultSets

  4. Environment settings

getValue("#env",fieldName)

<$#env.fieldName$>

Retrieves the value of the specified metadata field from the environment settings.

getValue(ResultSetName,fieldName)

<$ResultSetName.fieldName$>

Retrieves the value of the specified metadata field from the current row of the specified ResultSet.

getValue(ResultSetName,columnName)

<$ResultSetName.columnName$>

Retrieves the value of the specified column from the current row of the specified ResultSet.

getValue(columnName)

<$columnName$>

Retrieves the value of the specified column from the current row of the current ResultSet.

getValue(ResultSetName,"#row")

<$ResultSetName.#row$>

Retrieves the number of the current row in the specified ResultSet.

The first row is 0.

getValue(ResultSetName,"#numRows")

<$ResultSetName.#numRows$>

Retrieves the total number of rows in the specified ResultSet.

getValue(ResultSetName,"#isRowPresent")

<$ResultSetName.#isRowPresent$>

Checks if at least one row is present in the specified ResultSet.

This is useful when looping manually with rsNext.

getValue(ResultSetName,"#isEmpty")

<$ResultSetName.#isEmpty$>

Checks if the specified ResultSet does not contain any rows.


Output

Example

See Also


getValueForSpecifiedUser()

Retrieves the value of a user attribute for a specific user. This function can be useful for defining extended workflow functionality.

Type and Usage

Parameters

Takes two parameters:

Output

Example

Retrieves the full name for mjones.

<$getValueForSpecifiedUser('mjones', 'dFullName')$>

getViewValue()

Returns the display value for an item in a Schema option list.

For example, assume an option list exists for a custom metadata field named Customer. In the database there is a schema table with the CustomerName and a unique CustomerID. On checkin the CustomerName is visible to the user but the CustomerID is what is stored in the database. The getFieldViewDisplayValue function extracts the human-readable CustomerName based on the CustomerID.

Type and Usage

Parameters

This function takes three parameters:

Output

Returns the display value.

Example

<$custName = getViewValue("Customer_View", "1234", "CustomerName")$>
<$custRegion = getViewValue("Customer_View", "1234", "CustomerRegion")$>

See Also


getViewValueResultSet()

This function loads a schema table and places it on the page as a ResultSet named SchemaData. The column names in the ResultSet are the same as the names in the database table.

This function is most useful to obtain a list of dependent choices based on a parent value.

Type and Usage

Parameters

Takes three parameters:

Example

Assume you have a schema table and view for a list of countries. The view is named Country_view.

To output the contents of that table to the page, use the following code.

<$getViewValuesResultSet("Country_View", "", "")$>
<$loop SchemaData$>
<$count = 0, num = rsNumFields("SchemaData")$>
    <$loopwhile count < num$>
        <$fieldName=rsFieldByIndex("SchemaData", count)$>
        <$fieldName$> = <$getValue("SchemaData", fieldName)$>
        <$count = count + 1$>
    <$endloop$>
<$endloop$>

This will output the table even if you do not know the column name.

In the following example, assume you have a DCL for the fields Country and State. The list of States depends on which Country is selected. To obtain the list of States when the Country is USA, use this code:

<$getViewValuesResultSet("State_View", "Country_State", "USA")$>

hasAppRights()

Checks if the current user has rights to an administrative application.

Type and Usage

Parameters

The only parameter is one of the following administrative applications:

Output

Example

Evaluates whether the current user has rights to the specified application.

<$hasAppRights('RepoMan')$>

HasExternalUsers

Indicates to Content Server that an external user database is present.

When set to TRUE, the system recognizes external users. If a custom component has been written to support an external user integration (such as LDAP), this should be set to TRUE.

Default is FALSE.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

As a configuration setting:

HasExternalUsers=true

As Idoc Script, returns the value of the configuration setting:

<$HasExternalUsers$>

See Also


HasLocalCopy

Checks whether the client computer has a copy of the requested content item in the download target directory.

Generally used to query the user whether to overwrite when downloading. For example, this variable is used by the Oracle ODMA Client.

Type and Usage

Output

Example

Checks for a local copy of the content item:

<$HasLocalCopy$>

See Also


hasOptionList

Specifies that the metadata field has an option list.

Type and Usage

Output

Example

Specifies that the field has an option list:

<$hasOptionList=1$>

Generates the option list values if the field has an option list:

<$if hasOptionList$>
    <$if isQuery$></td><td><$endif$>
    <$include std_option_list_entry$>
<$endif$>

See Also


HasOriginal

Checks if an original file exists for a revision.

This variable checks for a dOriginalName value.

It is possible for a content item to be checked in but to not have an original file (for example, when a Basic workflow has been started but files have not been checked in at the initial contribution step).

Type and Usage

Output

Example

Checks for an original file:

<$if HasOriginal and not isNew$>

HasPredefinedAccounts

Checks if the current user has permission to any predefined accounts. Predefined accounts are those that are created in the User Admin utility.

Type and Usage

Output

Example

Displays the Accounts option list if the user is assigned to any predefined accounts:

<$if HasPredefinedAccounts$>
    <$fieldIsOptionList = 1, optionListName = "docAccounts",     fieldOptionListType = "combo"$>
<$endif$>

HasUrl

Checks if a file exists in the weblayout directory for the current content item.

Type and Usage

Output

Example

Checks for a weblayout file:

<$if HasUrl$>
    <$include doc_url_field$>
<$endif$>

HeavyClient

Checks if the checkin is through the Content Server ODMA client or Upload applet.

Type and Usage

Output

Example

Checks for check in method:

<$HeavyClient$>

htmlRefreshTimeout

Similar to DefaultHtmlRefreshTimeoutInSeconds. Defines the time, in seconds, that a Work In Progress page, My Checked-Out Content page or My Workflow Assignments page refreshes.

htmlRefreshTimeout can be set in the URL or the service's databinder. This can be used to set a different refresh time for different pages. If that is needed, do not set DefaultHtmlRefreshTimeoutInSeconds in the config.cfg file, but instead set htmlRefreshTimeout in the URL or databinder.

Type and Usage

Example

In the page's URL:

&htmlRefreshTimeout=90

See Also


htmlRefreshUrl

Used to set the URL of the page to load after a Work In Progress page, My Checked-Out Content page or My Workflow Assignments page is refreshed. The default is the current page. This variable can be set in the URL of the page or the databinder of the service.

Type and Usage

Example

In the page's URL:

&htmlRefreshUrl=http://www.home.com

See Also


HttpAbsoluteCgiPath

Retrieves the Content Server CGI path as a complete URL.

This variable cannot be modified directly; to change the path, use the HttpAbsoluteCgiRoot configuration setting, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content.

Type and Usage

Output

Returns the path as a string.

Example

Returned for a Content Server domain:

HttpAbsoluteCgiPath=http://localhost/domain/idcplg/

See Also


HttpAdminCgiPath

Retrieves the Admin Server CGI path as a relative URL.

Type and Usage

Output

Returns the Admin Server CGI path as a string.

Example

Returned for a Content Server instance:

HttpAdminCgiPath=/idcplg/idc_cgi_isapi-instance.dll/cs-admin/pxs

HttpBrowserFullCgiPath

This variable is used to set explicit control over the CGI path construction made for applets and the Admin Server.

Content Server evaluates the HTTP address in the address bar of the browser. If the HttpIgnoreWebServerInternalPortNumber configuration entry is not sufficient to assist the evaluation, HttpBrowserFullCgiPath can be set with an explicit answer.

Specify a relative path to the Content Server instance (idc1 in the example that follows).

Type and Usage

Example

HttpBrowserFullCgiPath=http://localhost/idc1/idcplg

See Also


HttpCgiPath

Retrieves the Content Server CGI path.

The following configuration settings are used to determine the value of this variable:

Variable Description

UseSSL

When set to TRUE, the secure sockets layer (SSL) is used (https instead of http).

isAbsoluteCgi

Defines whether the complete URL is used instead of a relative path. This is an internal flag set by the Content Server instance and is not intended for user configuration.


Type and Usage

Output

Returns the path as a string.

Example

Returned for a Content Server instance:

HttpCgiPath=/domain/idcplg

See Also


HttpCommonRoot

Retrieves the URL of the common directory.

Multiple Content Server instances can share resources from one Content Server installation. This variable defines the URL path to the DomainHome/ucm/cs/common/ directory of the Content Server instance whose resources are being shared. For example, the HttpCommonRoot defines the prefix to use for accessing the shared common directory where web applets are located.

Type and Usage

Output

Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.

Example

Returned for a Content Server instance:

HttpCommonRoot=/domain/common/

See Also


HttpEnterpriseCgiPath

Retrieves the CGI path of a Content Server instance as a relative URL.

Type and Usage

Output

Returns the Content Server CGI path as a string.

Example

Returned for a Content Server:

HttpEnterpriseCgiPath=/idcplg/idc_cgi_isapi-instance.dll

See Also


HttpHelpRoot

Retrieves the URL of the help directory.

Multiple Content Server instances can share online help files from one Content Server installation. This variable defines the URL path to the DomainHome/ucm/cs/weblayout/help/ directory of the Content Server instance whose help files are being shared.

Type and Usage

Output

Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.

Example

Returned for a Content Server instance:

HttpHelpRoot=/domain/help/

See Also


HttpImagesRoot

Retrieves the URL of the images directory.

Multiple Content Server instances can share user interface images from one Content Server installation. This variable defines the URL path to the DomainHome/ucm/cs/weblayout/images/ directory of the Content Server instance whose image files are being shared.

Type and Usage

Output

Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.

Example

Returned for a Content Server:

HttpImagesRoot=/domain/images/

See Also


HttpLayoutRoot

Retrieves the URL of the folder containing the current layout files. This is useful if you have additional JavaScript resources specific to the current layout.

Type and Usage


HttpRelativeAdminRoot

Retrieves the relative URL of the Admin Server for a Content Server instance.

Defaults to /cs-admin/ during installation.

Type and Usage

Output

Returns the relative URL as a string.

Example

Returned for a Content Server:

HttpRelativeAdminRoot=/cs-admin/

HttpRelativeWebRoot

Defines the web server root directory as a relative URL.

Type and Usage

Location

Example

As a configuration setting, defines the relative web root:

HttpRelativeWebRoot=/domain/

As Idoc Script, returns the relative web root as a string:

<$HttpRelativeWebRoot$>

See Also


HttpServerAddress

Defines the web server address as a partial URL.

A partial URL such as mycomputer is used rather than a full address such as http://www.mycomputer.com/.

Returns the web server address as a string.

There is no default value.

Type and Usage

Location

Example

As a configuration setting, defines the web server address:

HttpServerAddress=mycomputer

As Idoc Script, returns the web server address as a string:

<$HttpServerAddress$>

See Also


HttpSystemHelpRoot

Similar to the HttpHelpRoot variable except this variable returns the path to the help files for the default system language.

Type and Usage

Output

Returns the path to the help files.

Example

HttpSystemHelpRoot=/domain/help/

See Also


HttpWebRoot

Retrieves the URL path of the weblayout/ directory.

Multiple Content Server instances can share resources from one Content Server installation. This variable defines the URL path to the DomainHome/ucm/cs/weblayout/ directory of the Content Server instance whose resource files are being shared.

The following configuration settings determine the value of this variable:

Variable Description

UseSSL

When set to TRUE, the secure sockets layer (SSL) is used (https instead of http).

isAbsoluteWeb

Defines whether the complete URL is used instead of a relative path. This is an internal flag set by the Content Server instance and is not intended for user configuration.


Type and Usage

Output

Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.

Example

Returned for a Content Server:

HttpWebRoot=/domain/

See Also


HTTP_ACCEPT

Retrieves a list of content types that the browser can accept.

Type and Usage

Output

Returns a list of content types as a comma-delimited string.

Example

As information output on a page or to a log:

HTTP_ACCEPT=text/xml,application/xml,application/xhtml+xml,text/html;
q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;
q=0.2,text/css,*/*;q=0.1

As part of an Idoc Script statement or evaluation:

<$if HTTP_ACCEPT$>
<!--statement-->

HTTP_ACCEPT_ENCODING

Retrieves a list of compression encodings that the browser supports.

As of Content Server version 7.0, HTML files are compressed for delivery. GZIP compression is the default.

Type and Usage

Output

Returns a list of compression encodings as a comma-delimited string.

Example

As information output on a page or to a log:

HTTP_ACCEPT_ENCODING=gzip, deflate, compress;q=0.9

As part of an Idoc Script statement or evaluation:

<$if HTTP_ACCEPT_ENCODING$>
<!--statement-->

HTTP_ACCEPT_LANGUAGE

Retrieves a list of ISO languages that are set for the browser.

This variable might be useful for estimating which user locale to set for new or guest users.

Type and Usage

Output

Returns a list of languages as a comma-delimited string.

Example

As information output on a page or to a log:

HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.50

As part of an Idoc Script statement or evaluation:

<$if HTTP_ACCEPT_LANGUAGE$>
<!--statement-->

HTTP_COOKIE

Retrieves the name/value pair of the cookie in the HTTP request header.

Type and Usage

Output

Returns a string in the format name1=string1; name2=string2.

Example

As information output on a page or to a log:

HTTP_COOKIE=IntradocAuth=Basic; IntrdocLoginState=1

As part of an Idoc Script statement or evaluation:

<$if HTTP_COOKIE$>
<!--statement-->

HTTP_HOST

Retrieves the name of the web server.

Type and Usage

Output

Returns the web server name as a string.

Example

As information output on a page or to a log:

HTTP_HOST=centralserver

As part of an Idoc Script statement or evaluation:

<$if HTTP_HOST$>
<!--statement-->

HTTP_INTERNETUSER

Retrieves the CGI parameter that the web server security filter passes to the system so that the system can set the user.

If this variable is not set, the value of the REMOTE_USER variable is used.

If HTTP_INTERNETUSER and REMOTE_USER variables are not set, the user is anonymous.

Type and Usage

Output

Returns the user name as a string.

Example

As information output on a page or to a log:

HTTP_INTERNETUSER=admin

As part of an Idoc Script statement or evaluation:

<$if HTTP_INTERNETUSER$>
<!--statement-->

HTTP_REFERER

Retrieves the complete URL of the referenced directory on the local server.

Type and Usage

Output

Returns the complete URL as a string.

Example

As information output on a page or to a log:

HTTP_REFERER=http://centralserver/domain/

As part of an Idoc Script statement or evaluation:

<$if HTTP_REFERER$>
<!--statement-->

HTTP_USER_AGENT

Retrieves the client browser type, version number, library, and platform for which the browser is configured.

Type and Usage

Output

Returns a string in the format software/version (library) (platform).

Example

As information output on a page or to a log:

HTTP_USER_AGENT=Mozilla/4.7 [en] (WinNT; U)

As part of an Idoc Script statement or evaluation:

<$if HTTP_USER_AGENT$>
<!--statement-->

IdcAuthExtraRequestParams

Specifies values for the web server plug-in to get from its local data and send in the header of its requests.

For example, if you have a plug-in to the web server filter getting some attributes for a user and placing them into a local value, you could specify the name of the attributes in IdcAuthExtraRequestParams, and the data would be passed to the Content Server instance.

This setting can also be used to access extra HTTP header values using Idoc Script. These variables will become part of the Data Binder environment variable set.

There is no default value.

For information about IdcCommand, see Chapter 27, "Using the IdcCommand Utility to Access Content Server."

Type and Usage

Location

IntradocDir/config/config.cfg

Example

The following setting tells the IIS web server plug-in to send the local value of HTTP_REFERER in the header (IIS automatically adds the HTTP_ prefix):

IdcAuthExtraRequestParams=referer

idocTestForInclude()

This function tests to find out if a dynamichtml resource exists.

Type and Usage

Parameters

This function has one parameter: includeName is the name of the dynamichtml resource.

Output

If the resource exists, then it returns TRUE.

Example

<$if idocTestForInclude("std_page_begin")$>    <$include std_page_begin$><$endif$>

inc()

Adds the code from an include resource to the page.

This function does the same thing as the include keyword, except that it can take an Idoc Script variable as the parameter. For more information, see Section 3.4.1, "Keywords Versus Functions."

Type and Usage

Parameters

The only parameter is a variable that defines the name of an include.

Output

Displays the code that is defined in the specified include resource.

Example

Say you wanted to execute some Idoc Script for some, but not all, of your custom metadata fields. You could dynamically create includes based on the field names (such as specific_include_xComments) by executing this Idoc Script:

<$loop DocMetaDefinition$>
    <$myInclude = "specific_include_" & dName$>
    <$exec inc(myInclude)$>
<$endloop$>

Note the use of the exec keyword, which suppresses the output of the include specified by the inc function. If you don't use exec before the inc function, the HTML inside the specified include will be displayed on the page.

Note that if the specific_include_xComments does not exist, this code will not throw an error because the output is not being displayed.

See Also


incDynamicConversionByRule()

Returns the results of converting the LatestReleased revision of a document using the template and layout associated with a particular Dynamic Converter conversion rule.

Fragments created through forced conversions can be referenced directly using this function.

Type and Usage

Parameters

Takes two parameters:

Output

Retrieves the specified document converted according to the template and layout defined for the specified conversion rule.

Example

Retrieves the converted rendition of the content item with a Content ID of PhoneList, converted according to conversion rule RuleA:

<$incDynamicConversionByRule("PhoneList","RuleA")$>

See Also


incGlobal()

Includes the entire contents of a text file in the display of the current page.

This function is used to generate the default portal page.

A global include file is a text file that contains HTML code, Idoc Script code, or both. It is loaded on server startup.

Global include files must have the .inc extension and must be located in the DomainHome/ucm/cs/data/pages/ directory.

Type and Usage

Parameters

The only parameter is the name of a global include file without the .inc file extension.

Output

Displays the code that is defined in the specified global include file.

Example

When you change the portal page using the Update Portal function in the Web Layout Editor, a global include file called portal_message.inc is created to contain your modified text. This file is then referenced in the pne_home_page.htm template file as follows:

<$incGlobal("portal_message")$>

include

Adds the code from an include resource (defined by <@dynamichtml include_name@>) to the page.

This keyword is the most commonly used command in Idoc Script, as it allows you to reuse small chunks of code on multiple template pages.

For more information, see Section 3.3.1, "Includes."

Type and Usage

Parameters

The only parameter is the name of the include.

Output

Displays the code that is defined in the specified include resource.

Example

The following includes are used to create the beginning and end of most Content Server web pages. These includes are defined in the following file:

IdcHomeDir/resources/core/standard_page.htm

<$include std_html_head_declarations$>
<$include body_def$>
<$include std_page_begin$>
    Hello World!
<$include std_page_end$>

See Also


incTemplate()

Adds the contents of a Content Server template to a page, after evaluating any Idoc Script.

You can use this function to include the content of an entire template. However, this usage is discouraged because resource includes are usually sufficiently flexible to support all requirements for the sharing of Idoc Script between pages.

Type and Usage

Parameters

The only parameter is the name of a Content Server template file without the .htm file extension.

Output

Displays the code that is defined in the specified template.

Example

Retrieves the new_look template file.

<$incTemplate("new_look")$>

indexerSetCollectionValue()

This function modifies the logic of the search indexer. This function is designed to allow calculation of cumulative statistics about the index collection.

Type and Usage

Parameters

Takes two parameters:

Any name and value can be used. These values become available the next time the resource include is executed for the index collection.


InstanceDescription

Defines a description for the instance.

The instance description is used in the Content Server interface.

Type and Usage

Location

Example

As a configuration entry:

InstanceDescription=Master_on_Server1

As Idoc Script, returns the server instance description as a string:

<$InstanceDescription$>

See Also


isActiveTrace()

Checks if a section is being traced in the core.

Type and Usage

Output

Returns active trace results.

Example

<$isActiveTrace()$>

See Also


isCheckin

Specifies if the current page is a checkin page.

When set to TRUE, the current page is identified as a checkin page.

When set to FALSE, the current page is not identified as a checkin page.

Type and Usage

Output

Example

Set at the top of a page:

isCheckin=1

Used as script:

<$if isCheckin or isUpdate or isQuery$>
    <$isFormSubmit = 1$>
    <$if not isQuery$>
        <$isEditMode = 1$>
        <$formName = "Checkin"$>
    <$endif$>
    <$else$>
        <$isFormSubmit = ""$>
        <$isEditMode = ""$>
<$endif$>

IsCheckinPreAuthed

Checks if a checkin application pre-authorized the current checkin by getting a security token.

Type and Usage

Output

Example

Checks for checkin pre-authorization:

<$IsCheckinPreAuthed$>

isComponentEnabled

Checks if the defined component in enabled.

Type and Usage

Parameters

The only parameter is the component name.

Output

Example

<$isComponentEnabled("Folders")$>

IsContributor

Used to evaluate whether a user is a contributor. Generally used to determine whether to show special links on a page (for example, std_page uses it to decide whether to display the Content Manager link).

Type and Usage

Output

Example

Used to evaluate whether a user is a contributor:

<$if IsContributor$>

IsCriteriaSubscription

Evaluates whether a subscription to the content item is criteria-based rather than based on the Content ID (dDocName).

Type and Usage

Output

Example

Evaluates whether subscription is criteria based:

<$IsCriteriaSubscription$>

IsCurrentNav

Checks if the page currently being displayed is the same as the page being looped over while building the Next/Previous navigation on search results pages.

Type and Usage

Output

Example

If the navigation loop is at the current page, the page number is displayed as plain text. If the navigation loop is not at the current page, the page number is displayed as a hypertext link:

<$loop NavigationPages$>
<$if IsCurrentNav$>
    <$HeaderPageNumber$>
<$else$>
    <a href="<$strRemoveWs(inc("searchapi_navigation_specific_page"))$>">
    <$HeaderPageNumber$></a>
<$endif$>
<$endloop$>

isDocPage

Specifies if the current page is a page that displays metadata (such as search, checkin, and content information pages).

When set to TRUE, the current page is identified as a document page.

When set to FALSE, the current page is not identified as a document page.

Type and Usage

Output

Example

Set at the top of a page:

isDocPage=1

Used as script:

<$if isDocPage$>
    <!--statement-->
<$endif$>

IsDynamic

Checks if the page is presented dynamically to the user.

Most pages viewed by the user are dynamic. However, some static pages are designed to be delivered to the user without changes. Examples are the guest portal page and the content of some auto generated e-mails.

Type and Usage

Output

Example

Evaluates whether the page is presented dynamically:

<$if IsDynamic$>
    <a href="<$redirect$>">
<$endif$>

IsDynamicConverterEnabled

Enables Dynamic Converter.

This value is set to FALSE during initial WebCenter Content installation.

This value is set to TRUE during Dynamic Converter installation.

Default is FALSE.

Type and Usage

Location

Example

As a configuration setting, enables Dynamic Converter functionality:

IsDynamicConverterEnabled=true

As Idoc Script, used to evaluate whether dynamic converter functionality is enabled:

<$if IsDynamicConverterEnabled and isTrue(IsDynamicConverterEnabled)$>
    <tr>
      <td align="center" width="75">
        <a href="<$HttpCgiPath$>?IdcService=GET_TEMPLATE_CONVERSIONS">
          <img src="<$HttpImagesRoot$><$admin_conversion_image$>" border="0"
        width="<$adminImageWidth$>" height="<$adminImageHeight$>"></a>
      </td>
      <td width="10">&nbsp;
      </td>
      <td width="245"><span class=largeTableEntry>
        <a href="<$HttpCgiPath$>?IdcService=GET_TEMPLATE_CONVERSIONS">
        <$lc("wwTemplateConversions")$></span></a>
      </td>
    </tr>
<$endif$>

isEditMode

Specifies if metadata fields on the current page can be edited.

This variable is set on checkin and content information update pages.

When set to TRUE, metadata fields on the current page can be edited.

When set to FALSE, metadata fields on the current page cannot be edited.

Type and Usage

Output

Example

Set at the top of a page:

isEditMode=1

Used as script:

<$if isCheckin or isUpdate or isQuery$>
    <$isFormSubmit = 1$>
    <$if not isQuery$>
        <$isEditMode = 1$>
        <$formName = "Checkin"$>
    <$endif$>
    <$else$>
        <$isFormSubmit = ""$>
        <$isEditMode = ""$>
<$endif$>

IsEditRev

Checks whether the current revision is in an Editor step in a workflow.

When set to TRUE, reviewers can check out, edit, and check in the revision.

This variable is set by defining a workflow step as an Editor step in the Workflow Admin tool. This variable is evaluated on the checkin page.

Type and Usage

Output

Example

Provides workflow details:

<$if IsEditRev$>
    addCheckinValue("IdcService", "WORKFLOW_CHECKIN");
if (form.isFinished.checked)
    addCheckinValue("isFinished", form.isFinished.value);
<$else$>
    addCheckinValue("IdcService", "CHECKIN_SEL");
<$endif$>

isExcluded

Completely excludes the metadata field from the page.

Type and Usage

Output

Example

Excludes the current metadata field from the page:

<$isExcluded=1$>

Sets a custom variable depending on the active value of isExcluded for the current metadata field:

<$isCustomExcluded = getValue("#active", fieldName & ":isExcluded")$>
$isCustomRelocated = getValue("#active", fieldName & ":isRelocated")$>
<$if isCustomExcluded or (isCustomRelocated and not isRelocated) or isExcluded or (isFieldHidden and not isFormSubmit)$>
    <$isFieldExcluded = 1$>
<$endif$>

See Also


IsExternalUser

Checks if the user is accessing the Content Server instance from an external system, such as a LDAP system.

Type and Usage

Output

Example

Checks if user is at an external location:

<$IsExternalUser$>

IsFailedConversion

Checks if the Oracle WebCenter Content: Inbound Refinery system has failed to convert the content item.

Type and Usage

Output

Example

Displays text if the conversion process was not complete:

<$if IsFailedConversion$>
    <p><font face="arial" size="2">
    The Refinery was unable to complete the conversion process.</p>
<$endif$>

IsFailedIndex

Checks if the Indexer has failed to index the content item.

Type and Usage

Output

Example

Displays text if the content item was not indexed:

<$if IsFailedIndex $>
    <p><font face="arial" size="2">
    Unable to index content item.</p>
<$endif$>

sawflies()

Checks if a string or expression evaluates to FALSE.

Type and Usage

Parameters

The only parameter is the string or expression to be evaluated.

Output

If the parameter is a string:

If the parameter is not a string:

Example

Evaluates the string false and returns TRUE (1):

<$isFalse("false")$>

Evaluates that the integer five is greater than one and returns FALSE (0):

<$isFalse(5>1)$>

Evaluates the result of the equation as zero and returns TRUE (1):

<$isFalse(1-1)$>

Evaluates the string equality statement as true and returns FALSE (0):

<$isFalse(strEquals("abc","abc"))$> 

See Also


is Field Excluded

Specifies that the metadata field is excluded.

Type and Usage

Output

Example

Determines if the metadata field is excluded:

<$if isCustomExcluded or (isCustomRelocated and not isRelocated) or isExcluded or (isFieldHidden and not isFormSubmit)$>
    <$isFieldExcluded = 1$>
<$endif$>

See Also


isFieldHidden

Specifies that the metadata field is hidden.

Type and Usage

Output

Example

Determines if the metadata field is hidden:

<$if isHidden or isCustomHidden$>
    <$isFieldHidden = 1$>
<$else$>
    <$isFieldHidden = ""$>
<$endif$>

See Also


isFieldInfoOnly

Specifies that the metadata field is an information only field.

Type and Usage

Output

Example

Determines if the metadata field is information only:

<$if isInfo or isCustomInfo or isFieldHidden or isInfoOnly$>
    <$isFieldInfoOnly = 1$>
<$else$>
    <$isFieldInfoOnly = ""$>
<$endif$>

See Also


isFieldMemo

Specifies that the metadata field is a memo field.

Type and Usage

Output

Example

Determines if the field is a memo field:

<@dynamichtml compute_std_entry_type_info@>
<$if not hasOptionList and #active.fieldType like "Memo"$>
    <$isFieldMemo = 1$>
<$else$>
    <$isFieldMemo = ""$>
<$endif$>
<@end@>

See Also


IsFilePresent

Checks if the page currently being displayed is for the revision being looped over while building the Revision History table on a content information page.

Type and Usage

Output

Example

If the loop is at the current revision, the revision number is displayed as plain text. If the loop is not at the current revision, the revision number is displayed as an active button.

<@dynamichtml doc_rev_info@>
<$if IsFilePresent$>
  <td width=10% align=center><span class=strongHighlight><$dRevLabel$></span></td>
  <td nowrap width=30%><span class=strongHighlight><$dInDate$></span></td>
  <td nowrap width=30%><span class=strongHighlight>
    <$if dOutDate$><$dOutDate$><$else$><$lc("wwNone")$><$endif$></span></td>
      <td width=20%><span class=strongHighlight>
      <$rptDisplayMapValue("StatusList", dStatus)$></span></td>
    <$else$>
  <td width=10%><form action="<$HttpCgiPath$>" method=GET>
  <input type=hidden name=IdcService value="DOC_INFO">
  <input type=hidden name=dID value="<$dID$>">
  <input type=hidden name=dDocName value="<$dDocName$>">
  <input type=submit value="       <$dRevLabel$>      ">
  </form></td>
...
<@end@>

isFormSubmit

Specifies if the current page is a submittable HTML form.

When set to TRUE, the current page is a submittable HTML form.

When set to FALSE, the current page is not a submittable HTML form.

Type and Usage

Output

Example

Set at the top of a page:

isFormSubmit=1

Adds a colon after the field captions if the page is not a submittable HTML form:

<@dynamichtml std_field_caption@>
    <span class=<$fieldCaptionStyle$>>
    <$fieldCaption$><$if not isFormSubmit$><$":"$><$endif$>
    </span>
<@end@>

IsFullTextIndexed

Checks if the Indexer has full-text indexed the content item.

Type and Usage

Output

Example

Provides a specified URL if the content item is full-text indexed:

<$if IsFullTextIndexed$>
    <a href="<$redirect$>">
<$endif$>

isHidden

Hides the metadata field from the user but includes the field as hidden data on the page.

Type and Usage

Output

Example

Hides the current metadata field from the user:

<$isHidden=1$>

Sets a custom variable depending on the active value of isHidden for the current metadata field:

<$isCustomHidden = getValue("#active", fieldName & ":isHidden")$>
    <$if isHidden or isCustomHidden$>
<$isFieldHidden = 1$>
<$else$>
    <$isFieldHidden = ""$>
<$endif$>

See Also


isInfo

Specifies if the current page is an information-only page.

When set to TRUE, the current page is identified as an information-only page.

When set to FALSE, the current page is not identified as an information-only page.

Type and Usage

Output

Example

Set at the top of a page:

isInfo=1

Used as script:

<$if isInfo$>
    <$captionFieldWidth="30%"$>
    <$captionEntryWidth="70%"$>
<$elseif isEditMode$>
    <$captionFieldWidth="20%"$>
    <$captionEntryWidth="80%"$>
<$endif$>

isInfoOnly

Displays the metadata field as information only, not as an input field.

Type and Usage

Output

Example

Displays the current metadata field as information only:

<$isInfoOnly=1$>

Sets a custom variable depending on the active value of isInfoOnly for the current metadata field:

<<$isCustomInfo = getValue("#active", fieldName & ":isInfoOnly")$>
<$if isInfo or isCustomInfo or isFieldHidden or isInfoOnly$>
    <$isFieldInfoOnly = 1$>
<$else$>
    <$isFieldInfoOnly = ""$>
<$endif$>

See Also


IsJava

Displays the local data of a Content Server web page.

This variable can be set as a flag on a page or as a parameter to a service call.

Type and Usage

Output

When set to TRUE, returns the local data in the DataBinder, in HDA format.

Example

When included in the code on a Content Server web page, displays the local data of a page:

<$IsJava=1$>

When included in a Content Server URL, displays the local data for the New Checkin page:

http://myinstance.com/idcplg/idc_cgi_isapi-instance.dll?IdcService=CHECKIN_NEW_FORM&IsJava=1

isLayoutEnabled()

Used to determine if a particular layout is installed and enabled.

Type and Usage

Parameters

Takes one parameter, the ID of the layout.

Example

In the std_resources.htm file:

<$if isLayoutEnabled("Trays")$><$do Publish=1$><$endif$>

isLinkActive

Used by Idoc Script to determine whether to include the profile in a display of profiles for check-in or search based on specified conditions, such as a user's name. If the specified condition or conditions evaluate to true, the value of IsLinkActive is set to true (1) and the profile is included in the list of available profiles.

Type and Usage

Parameters

There are no parameters, just the setting of 1 or 0 (true or false) based on the evaluated condition or conditions.

Example

Here is the default script for a condition set with a single clause. If the user name matches "guest", then isLinkActive is set to 1 and the profile is included in the list of available profiles for that user.

<$if getUserValue("dName") like "guest"$> 
<$isLinkActive=1$> 
<$endif$>

IsLocalSearchCollectionID

Checks if the content item is in the local search collection. Searches for the content item's Content ID in the local search collection.

Type and Usage

Output

Example

Evaluates whether a content item is from a local collection:

<@dynamichtml searchapi_define_result_doc_parameters@>
<$exec IsLocalSearchCollection="1"$>
<$if not IsLocalSearchCollectionID$>
    <!--Collection has external ID-->
<$exec IsLocalSearchCollection=""$>

IsLoggedIn

Checks if the current user is logged in.

Type and Usage

Output

Example

Checks whether the user is logged in and has an e-mail address before performing a function.

<@dynamichtml subscription_action_script@>
function allowSubscription(form)
    {<$if IsLoggedIn$>
    <$if IsUserEmailPresent$>
    <$else$>
…}
<@end@>

IsMac

Checks if the client browser is running on a Macintosh operating system.

Type and Usage

Output

Example

Redirects to a different URL if the browser is running on a Mac:

<$if IsMac$>
    <a href="<$redirect$>">
<$endif$>

IsMaxRows

Checks if there are more results on a Work In Progress or Report page than the MaxQueryRows setting allows. For more information, see "MaxQueryRows" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content.

Type and Usage

Output

Example

Returns an error message if the maximum number of rows is exceeded:

<$elseif IsMaxRows$>
<table border=0 cellpadding=1 cellspacing=1 width="100%">
    <tr>
    <span class=smallHighlight><$lc("wwOutputLimitedByMaxRows")$>
    </span>
</tr>
</table>

isMultiOption

Specifies that a metadata field option list allows multiple values to be selected.

Type and Usage

Output

Example

Specifies that the field is a multiselect option list:

<$isMultiOption=1$>

Determines the type of option list:

<$if #active.fieldOptionListType like "*multi*"$>
    <$exec isMultiOption=1$>
<$elseif #active.fieldOptionListType like "access*"$>
    <$exec isAccessList=1$>
    <$exec isStrictList=1$>
<$elseif not (#active.fieldOptionListType like "*combo*")$>
    <!--Strict choice-->
    <$exec isStrictList=1$>
<$endif$>

See Also


IsMultiPage

Checks if multiple pages are needed for search results. This variable depends on the number of rows displayed per page, which is defined by the ResultCount input variable (default is 25).

Type and Usage

Output

Example

Evaluates number of rows and determines if multiple pages are needed:

<$IsMultiPage$>

isNew

Checks if the content item is new or a revision. This variable is set to TRUE by the CHECKIN_NEW_FORM and CHECKIN_SIMILAR_FORM standard services.

Type and Usage

Output

Example

If the content item is new, a specified service is performed:

<$if isNew$>
    <input type=hidden name=IdcService value="CHECKIN_NEW">
<$endif$>

If the content item is a revision, the original content item author is used:

<$if not isNew$>value="<$dDocAuthor$>"<$endif$>

If the content item is new, the default accounts for the current user are used:

<$if isNew$>
    <$defaultAccounts$>
<$endif$>

IsNotLatestRev

Checks if the revision is the last revision to be checked in. This is not necessarily the last released revision.

Type and Usage

Output

Example

Checks for the latest revision:

<$IsNotLatestRev$>

See Also


IsNotSyncRev

Checks whether the file on the client computer matches the most current revision by performing a revision ID (dID) comparison.

This variable is generally used to display an error message when the local copy of a content item has not been updated to the latest revision.

This variable is used to interface with client-side products, such as Desktop.

Type and Usage

Output

Example

Checks for a match with the latest revision and displays an error message:

<$if IsNotSyncRev$>
The local copy of this content item has not been updated to the latest revision. 
    Use Get Native File or Check Out to update your local copy of <$dDocName$>.
<$endif$>

IsOverrideFormat

Enables users to select a different conversion format upon checkin.

When set to TRUE, a Format option list is displayed for the Primary File and Alternate File on the checkin page.

Default is FALSE.

Type and Usage

Location

Example

As a configuration setting:

IsOverrideFormat=true

As Idoc Script, returns the value of the override format function:

<$IsOverrideFormat$>

IsPageDebug

Enables a trace of all includes and calls to the Idoc Script eval function.

The contents of the eval function and any dynamically assigned includes are also shown as part of the trace. The trace is indented by one + character per nested level of include or eval call. The trace also shows any error messages (without the nested location information) and the output of any calls to the Idoc Script trace function.

Note:

This setting is not supported in Internet Explorer version 6.

Type and Usage

Output

Results of the trace can be viewed through the debug menu toolbar options, which are accessed from the debug trace displayed at the bottom of the web page.

Click the debug trace to display the debug menu toolbar, then click any of the following options.

Element Description

hide all

Hides any open debug popups.

idocscript trace

Displays a tree structure view of all includes being called.

request binder

Displays information on Local Data and ResultSets. The request binder is the DataBinder sent to the server, that is, the service name and any service-specific parameters. Click a heading to expand the view of detailed information.

response binder

Displays information on Local Data and ResultSets. The response binder is the DataBinder immediately after the service is processed but before the response page is generated. Click a heading to expand the view of detailed information.

final page binder

Displays information on Local Data and ResultSets. The final page binder reflects what was changed in the DataBinder while the page was being generated. Click a heading to expand the view of detailed information.

javascript log

Displays Logger Console window with default setting of Verbose. Select checkboxes to display the following options: info, warn, error, time, window, trace, global, schema, javascript, LogReader. Click Pause or Clear to control the speed and amount of information displayed on the Logger Console.


If you are interested in API-level interaction with Content Server, consult the request and response binders. For example, when you do a SOAP request or use other service-based APIs, the information in the final page binder is meaningless. When you append IsJava=1 to the request, the response binder in HDA format is returned.

If you are interested in customization, page generation, and so on, you may want to consult the final page binder and, in some cases, determine how it differs from the response binder.

Example

Used as a configuration setting in the Content Server config.cfg file, so it applies to the entire server:

IsPageDebug=1

In a web browser, added to the end of the page's URL in the Address field:

&IsPageDebug=1

Used on a template page or in an Idoc Script include:

<$IsPageDebug=1$>

See Also


IsPromptingForLogin

Checks if the Content Server instance is set to prompt for login or if login is being handled programmatically.

This variable is set to TRUE in situations such as cookie login pages, where the last request failed because the user is not logged in yet.

Type and Usage

Output

Example

Evaluates if server is set to prompt for login:

<$IsPromptingForLogin$>

isQuery

Specifies if the current page is a search page.

When set to TRUE, the current page is identified as a search page.

When set to FALSE, the current page is not identified as a search page.

Type and Usage

Output

Example

Set at the top of a page:

isQuery=1

Used as script:

<$if isCheckin or isUpdate or isQuery$>
    <$isFormSubmit = 1$>
    <$if not isQuery$>
<$isEditMode = 1$>
<$formName = "Checkin"$>
    <$endif$>
    <$else$>
<$isFormSubmit = ""$>
<$isEditMode = ""$>
<$endif$>

isRelocated

Excludes the metadata field unless the local variable is set to TRUE while the include is evaluated.

This variable is typically used to set a custom location for a metadata field. It allows a field to be defined on a page more than once, with the location of the field that is actually generated depending on the value of this variable.

Type and Usage

Output

Example

Includes the current metadata field on the page:

<$isRelocated=1$>

Sets a custom variable depending on the active value of isRelocated for the current metadata field:

<$isCustomExcluded = getValue("#active", fieldName & ":isExcluded")$>
<$isCustomRelocated = getValue("#active", fieldName & ":isRelocated")$>
<$if isCustomExcluded or (isCustomRelocated and not isRelocated) or isExcluded or (isFieldHidden and not isFormSubmit)$>
    <$isFieldExcluded = 1$>
<$endif$>

See Also


IsRequestError

Checks if there is a request error condition present in the Content Server instance by evaluating the StatusCode variable.

If StatusCode is set to a negative numeric value (-1), there is a request error condition present in the Content Server instance.

The typical behavior when a request error condition is present is to abort the display of the current page and substitute an error page.

Type and Usage

Output

Example

Evaluates the request error condition:

<$IsRequestError$>

See Also


isRequired

Specifies if a value is required for a metadata field.

When set to TRUE, the metadata field is required.

When set to FALSE, the metadata field is optional.

Type and Usage

Output

Example

Defines the dDocTitle metadata field as a required field:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1,
    fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>

See Also


IsSavedQuery

Checks if a query has been saved to the current user's portal navigation bar.

Type and Usage

Output

Example

Evaluates query status:

<$IsSavedQuery$>

IsSoap

Displays the local SOAP data of a Content Server web page.

This variable can be set as a flag on a page or as a parameter to a service call.

Type and Usage

Output

When set to TRUE, returns the underlying SOAP code, in XML format.

Example

When included in the code on a Content Server web page:

<$IsSoap=1$>

When included in a Content Server URL:

http://myinstance.com/idcplg/idc_cgi_isapi-instance.dll?IdcService=CHECKIN_NEW_FORM&IsSoap=1

isStrictList

Specifies that a metadata field option list does not allow multiple values to be selected.

Type and Usage

Output

Example

Specifies that the field is not a multiselect option list:

<$isStrictList=1$>

Determines the type of option list:

<$if #active.fieldOptionListType like "*multi*"$>
    <$exec isMultiOption=1$>
<$elseif #active.fieldOptionListType like "access*"$>
    <$exec isAccessList=1$>
    <$exec isStrictList=1$>
<$elseif not (#active.fieldOptionListType like "*combo*")$>
    <!--Strict choice-->
    <$exec isStrictList=1$>
<$endif$>

See Also


IsSubAdmin

Checks if the current user has subadministrator rights to at least one administrative application.

Type and Usage

Output

Example

Checks whether the user is logged in and has subadministrator rights before performing a function.

<@dynamichtml subscription_action_script@>
    function allowSubscription(form)
    {
    <$if IsLoggedIn$>
    <$if IsSubAdmin$>
    <$else$>
    …
    }
<@end@>

IsSun

Checks if the client browser is running on a Sun system.

Type and Usage

Output

Example

Redirects to a different URL if the browser is running on Sun:

<$if IsSun$>
    <a href="<$redirect$>">
<$endif$>

IsSysManager

Checks if the current user has the sysmanager role, meaning the user has access to the Admin Server. This variable is usually used to conditionally display specific navigation links.

Type and Usage

Output


isTrue()

Checks if a string or expression evaluates to TRUE.

Type and Usage

Parameters

The only parameter is the string or expression to be evaluated.

Output

If the parameter is a string:

If the parameter is not a string:

Example

Evaluates the string yes and returns TRUE (1):

<$isTrue("yes")$>

Evaluates that the integer five is greater than one and returns TRUE (1):

<$isTrue(5>1)$>

Evaluates the result of the equation as zero and returns FALSE (0):

<$isTrue(1-1)$>

Evaluates the string equality statement as true and returns TRUE (1):

<$isTrue(strEquals("abc","abc"))$> 

See Also


isUpdate

Specifies if the current page is a content information update page.

When set to TRUE, the current page is identified as a content information update page.

When set to FALSE, the current page is not identified as a content information update page.

Type and Usage

Output

Example

Set at the top of a page:

isUpdate=1

Used as script:

<$if isCheckin or isUpdate or isQuery$>
    <$isFormSubmit = 1$>
    <$if not isQuery$>
        <$isEditMode = 1$>
        <$formName = "Checkin"$>
    <$endif$>
    <$else$>
        <$isFormSubmit = ""$>
        <$isEditMode = ""$>
<$endif$>

isUploadFieldScript

Specifies that an include is being used inside JavaScript. It is used to determine how metadata fields are uploaded.

When set to TRUE, the include is being used inside JavaScript.

When set to FALSE, the include is being used inside JavaScript.

Type and Usage

Output

Example

Set in the include that defines the JavaScript wrapper:

<@dynamichtml std_upload_java_script@>
    <script language="JavaScript">
    // Java script for uploading.
    <$isUploadFieldScript = 1$>
    <$include std_upload_info_script$>
    <$isUploadFieldScript = ""$>
    </script>
<@end@>

Used as script:

<$if isUploadFieldScript$>
    <$defaultFieldInclude = "std_file_entry"$>
<$else$>
    <$defaultFieldInclude = "std_nameentry_row"$>
    <$fieldCaptionInclude = "std_field_caption"$>
    <$fieldEntryInclude = "std_file_entry"$>
<$endif$>

IsUploadSockets

Used by the Upload applet to determine whether the upload socket should be used.

This is an internal flag and is not intended for user configuration.

Type and Usage

Output

Example

N/A


IsUserEmailPresent

Checks if an e-mail address is defined for the current user.

Type and Usage

Output

Example

Checks whether the user is logged in and has an e-mail address before performing a function.

<@dynamichtml subscription_action_script@>
    function allowSubscription(form)
    {
    <$if IsLoggedIn$>
    <$if IsUserEmailPresent$>
    <$else$>
    …
    }
<@end@>

isUserOverrideSet()

Enables users to check in content for other users.

This affects the Author option list on checkin pages. By default, only administrators are allowed to specify another user as the Author during checkin.

Type and Usage

Parameters

The only parameter is the value TRUE or FALSE.

Output

Evaluates to TRUE if the user override is enabled.

Example

Enables users to check in content items with another user specified as the Author:

<$isUserOverrideSet(true)$>

See Also


isValidateFile()

Used as a parameter to the Upload applet. This variable verifies that the file to be uploaded exists. In order to be used, a component must be created that overwrites the applet definition as defined in the std_multiupload_applet_definition include in the std_page.htm resource file.

Type and Usage

Example

Used as a configuration entry:

isValidateFile=true

isVerboseTrace

Checks if a section is being traced in the core. Verbose trace generates a full report.

Type and Usage

Output

Example

<$isVerboseTrace()$>

See Also


IsWindows

Checks if the client browser is running on a Windows operating system.

Type and Usage

Output

Example

Redirects to a different URL if the browser is running on Windows:

<$if IsWindows$>
    <a href="<$redirect$>">
<$endif$>

IsWorkflow

Checks if the content item on a checkin page is in a workflow.

Type and Usage

Output


IsXml

Displays a raw dump of the HTML form when set to TRUE in a URL to a HCSP or HCSF file. This is useful for extracting form data or submitting forms from a remote application.

Type and Usage

Output

See Also


isZoneSearchField

This function is used to specify a field for full text searching.

Type and Usage

Parameters

The name of the field to be checked.


js()

Formats a string for use in a "..." JavaScript literal string declaration.

This function performs string manipulation such as changing double quotes to single quotes.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string formatted for use in a JavaScript string declaration.

Example

Formats the string variablestring for use in a JavaScript string declaration:

<$js("variablestring")$>

jsFilename()

Used by schema. Encodes a string that may contain non-ASCII characters into the valid filename strings required for the operating system and Java Script (performs an encoding function).

Type and Usage

Parameters

The only parameter is the string to be encoded.

Output

Returns an encoded string.

Example

<$jsFilename(fileName)$>

Json

Displays the local data of a Content Server web page.

This variable can be set as a flag on a page or as a parameter to a service call.

Type and Usage

Output

When set to TRUE, returns the local data in the DataBinder in a JavaScript object, in compliance with the JSON (Javascript over network) specification.

Example

When included in the code on a Content Server web page, displays the local data of a page:

<$Json=1$>

When included in a Content Server URL, displays the local data for the New Checkin page:

http://myinstance.com/idcplg/idc_cgi_isapi-instance.dll?IdcService=CHECKIN_NEW_FORM&Json=1

lastEntryTs

Retrieves the timestamp from the last time the workflow step was entered.

This variable can be used to create conditional statements, but it should not be hard-coded or altered.

The last entry time is localized in the companion file and maintained in the key:

<step_name>@<workflow_name>.lastEntryTs

Type and Usage

Output

Returns the timestamp in the format defined by dateCurrent.

Example

The following code defines a jump called LastEntry, which exits to the parent workflow and notifies the reviewers if the last time the step was entered was more than one week ago:

<$if parseDate(wfCurrentGet("lastEntryTs")) < parseDate(dateCurrent(-7))$>
    <$wfSet("WfJumpName","LastEntry")$>
    <$wfSet("WfJumpTargetStep",wfExit(0,0))$>
    <$wfSet("WfJumpEntryNotifyOff","0")$>
<$endif$>

lc()

Retrieves the value of a localization string based on the current user's locale.

Type and Usage

Parameters

Takes one required parameter and any number of optional parameters:

Output

Example

Retrieves the options for metadata search operators on a search page:

<select name="op" >
    <option value="Contains"><$lc("wwContains")$>
    <option value="Matches"><$lc("wwMatches")$>
    <option value="Starts"><$lc("wwStarts")$>
    <option value="Ends"><$lc("wwEnds")$>
    <option selected value="Substring"><$lc("wwSubstring")$>
</select>

Sets the subject line for a workflow started notification e-mail. If the name of the workflow (dWfName) is Marketing, the resulting value in English is Workflow 'Marketing' has been started.

<@dynamichtml wf_started_subject@>
    <$lc("wwWfStarted", dWfName)$>
<@end@>

lcCaption()

Function that wraps a string into a caption. This will usually place a colon to the right of the string. For right-to-left reading languages, such as Hebrew and Arabic, the colon is placed on the left of the string.

Type and Usage

Parameters

Takes one required parameter:


LmDefaultLayout()

Defines the default layout to use (for example, Top Menus or Trays).

The default installation value is Trays.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

LmDefaultLayout=Top Menus

LmDefaultSkin()

Defines the default skin to use (for example, Oracle, Oracle2).

Type and Usage

Location

IntradocDir/config/config.cfg

Example

LmDefaultSkin=Oracle

lmGetLayout()

Retrieves the layout selected by the user (for example, Top Menus or Trays).

Type and Usage

Parameters

None.

Example

<$lmGetLayout()$>

See Also


lmGetSkin()

Retrieves the skin selected by the user.

Type and Usage

Parameters

None.

Example

<$lmGetSkin()$>

See Also


loadCollectionInfo()

Loads metadata for a search collection.

Used by the search service to load metadata about a search collection.

This function is not intended for user configuration.

Type and Usage

Parameters

Takes one parameter, the name of the search collection to be loaded.

Output

None.

Example

Loads search collection information:

<$loadCollectionInfo(collection_name)$>

loadDocMetaDefinition()

Loads the DocMetaDefinition database table into the active data as a ResultSet.

After the DocMetaDefinition database table is loaded, it can be looped on.

Type and Usage

Parameters

None.

Output

None.

Example

Loads the DocMetaDefinition table into the active data as a ResultSet.

<$loadDocMetaDefinition()$>

loadDocumentProfile()

Loads a content profile as specified by the trigger value for page presentation. This is called during the presentation of Search, Check In, Info, and Update pages. This function is called on request and the page on which it is called determines the action (for example, search, or info).

This information is dependent on context. The isCheckin, isUpdate, isQuery, or isInfo variables are set in local data and direct the loadDocumentProfile function to the page to be loaded and presented.

Type and Usage

Parameters

None.

Output

None.

Example

<$loadDocumentProfile()$>

See Also


loadSchemaData()

Loads the data from a schema ResultSet into the local data of the current data binder.

Type and Usage

Parameters

This function can take zero, one, or two parameters.

Example

<$loadSchemaData()$>

See Also


loadSearchOperatorTables()

Loads mappings between the full set of operator names and the search syntax. Used on the Search page.

Type and Usage

Parameters

None.

Output

Returns expressions associated with operator names (search operator map).

Example

<$loadSearchOperatorTables()$>

loadUserMetaDefinition()

This function loads the custom user metadata definition. This exists in the UserMetaDefinition table which is placed on the page as a ResultSet. This is used on LDAP administration pages to help administers map user metadata to the Content Server instance.

Type and Usage

Parameters

None.


localPageType

This function returns the page type for a page in the library folders. This may be a directory or a query page. This function is usually used by the Layout Manager API. When Trays is the selected layout, it is used to construct a tree view of the library's pages.

Type and Usage

Parameters

Takes one parameter, the link data used to construct the tree view.


MajorRevSeq

Defines the major sequence for revision numbers.

Returns the major revision label sequence (returns the value of the configuration setting).

Returns a string.

Default is 1-99.

Type and Usage

Location

Example

As a configuration setting:

MajorRevSeq=A-Z

As script, returns the value of the configuration setting:

<$MajorRevSeq$>

See Also


MaxCollectionSize

Defines the number of files to be passed to the Indexer in one batch.

Valid range is 1 to 65535.

A value of 2000 is recommended for large index collections. Lower values will result in inefficient indexing performance.

Returns the number of files per batch.

Default is 25.

Type and Usage

Location

Example

As a configuration setting, defines the batch size:

MaxCollectionSize=25

As script, returns the value from configuration files:

<$MaxCollectionSize$>

maxLength

Sets the maximum number of characters allowed in a metadata field.

Type and Usage

Output

Returns the maximum length of the field.

Example

Sets the maximum length of the field to 100 characters:

<$maxLength=100$>

Specifies a custom field length based on the length of the current field:

<$customFieldLength = getValue("#active", fieldName & ":maxLength")$>

MinorRevSeq

Defines the minor sequence for revision numbers.

Returns the minor revision label sequence (returns the value of the configuration setting).

Returns a string.

Type and Usage

Location

Example

As a configuration setting:

MinorRevSeq=a-c

As script, returns the value of the configuration setting:

<$MinorRevSeq$>

See Also


MSIE

Checks whether the client browser is Microsoft Internet Explorer.

Type and Usage

Output

Example

Redirects to a different URL if the browser is anything other than Internet Explorer:

<$if not MSIE$>
    <a href="<$redirect$>">
<$endif$>

MultiUpload

Enables the multiple file Upload Applet.

When set to TRUE, the Upload Applet is enabled so that multiple files can be zipped and checked in as a single content item.

When set to FALSE, the Upload Applet is disabled.

Default is FALSE.

Type and Usage

Location

Example

As a configuration setting, enables the Upload Applet:

MultiUpload=true

As script, evaluates the condition of the Upload Applet:

<$MultiUpload$>

See Also


NoMatches

Checks whether matches were found from a search query.

Generally used to display a message on the search results page.

Type and Usage

Output

Example

Displays text if no matches were found from a query:

<$if NoMatches$>
    <p><font face="arial" size="2">
    Found no matches out of <$TotalDocsProcessed$> documents searched matching the query.</p>
<$endif$>

noMCPrefill

Specifies that the MultiCheckin component should not prefill metadata fields.

This variable can be used on special pages such as custom HCST and contribution folders component pages.

When set to TRUE, the MultiCheckin component will not prefill metadata fields.

When set to FALSE, the MultiCheckin component will prefill metadata fields.

Type and Usage

Output

Example

Set near the top of the page:

noMCPrefill=1

Used as script:

<$noMCPrefill$>

NotificationQuery

This setting defines criteria for the automatic query that searches for expired content.

If NotificationQuery is not set, the default value is all content that expires in the next seven days.

Type and Usage

Parameters

There is one parameter, the query to be used. The query can be one of the following. See the "Example" section for sample queries.

Location

IntradocDir/config/config.cfg

Example

Idoc Script Example

When used in conjunction with database indexing, the following query provides email notification for all documents that expire in seven days:

NotificationQuery=dOutDate < '<$dateCurrent(7)$>'>

URL Encoded Example

The following query returns all content expiring after August 1, 2007. The URL from the browser address line is copied, beginning with the QueryText portion:

NotificationQuery=QueryText=dOutDate+%3C+%608%2F1%2F06%60&SearchProviders= [...}

Plain Text Query

The following query returns all content expiring after August 1, 2007:

NotificationQuery=8/1/07

See Also


OneMatch

Checks if only one match was found from a search query.

Generally used to display a message on the search results page.

Type and Usage

Output

Example

Displays text if only one match was found from a query:

<$if OneMatch$>
    <p><font face="arial" size="2">
    Found <$TotalRows$> document matching the query.</p>
<$endif$>

optionListKey

Specifies the name of a ResultSet column that contains option list values.

Type and Usage

Output

Returns the values of the option list ResultSet column.

Example

Specifies dFormat as the column in the DocFormats ResultSet to get option list values from for the standard Format field on a checkin page:

<@dynamichtml std_override_format_field@>
<$if not isInfo and IsOverrideFormat$>
<$fieldIsOptionList = 1, optionListResultSet = "DocFormats", 
    optionListKey = "dFormat", 
    optionListValueInclude = "std_override_format_option_value", 
    addEmptyOption = 1, emptyOptionLabel = lc("wwEmptyFormatOption")$>
<$include std_display_field$>
<$endif$>
<@end@>7

See Also


optionListName

Specifies the name of an option list.

For standard metadata fields, this is the name of the internal option list. For more information, see Section 3.6.3.1, "Internal Option Lists."

For custom metadata fields, this is the name of the field with a suffix of .options.

Type and Usage

Output

Returns the option list name.

Example

Sets the option list name to docAuthors if the field is not restricted to a single user:

<$if SingleUser$>
    <$isInfoOnly = 1$>
  <$else$>
    <$fieldIsOptionList = 1, optionListName = "docAuthors"$>
    <$if HasExternalUsers$><$fieldOptionListType= "combo"$>
    <$endif$>
<$endif$>

Defines the default option list script:

<$if optionsAllowPreselect and fieldValue$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":fieldValue$>"$>
<$else$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":noselected$>"$>
<$endif$>

See Also


optionListResultSet

Specifies the name of a ResultSet that contains option list values.

Type and Usage

Output

Returns the option list ResultSet.

Example

Specifies DocFormats as the option list ResultSet for the standard Format field on a search page:

<@dynamichtml std_format_fields@>
<$if ClientControlled or dFormat or dExtension$>
<$fieldName = "dFormat", fieldCaption = lc("wwNativeFormat"),
    optionListResultSet = "DocFormats"$> <$include std_display_field$>
<$fieldName = "dExtension", fieldCaption = lc("wwNativeExtension"), 
    fieldWidth = 10$>
<$include std_display_field$>
<$endif$>
<@end@>

Creates an option list by looping over a ResultSet:

<@dynamichtml compute_resultset_option_list_script@>
    <$if not optionListKey$>
<$optionListKey = fieldName$>
    <$endif$>
    <$defaultOptionListScript = "<$loop " & optionListResultSet & "$>" & 
    "<$inc('std_resultset_option_list_item')$>" & "<$endloop$>"$>
<@end@>

See Also


optionListScript

When this variable is set to a non-empty value, the eval function is used when displaying the option list for the field. This variable allows the standard implementation of option lists (defined by the defaultOptionListScript variable) to be overridden.

Type and Usage

Output

Example

Defines a custom script for creation of an option list:

<$customOptionListScript = getValue("#active", fieldName & ":optionListScript")$>

See Also


optionListValueInclude

Specifies an include that defines the values for an option list.

Type and Usage

Output

Returns the include code.

Example

Defines std_override_format_option_value as the option list value include:

<@dynamichtml std_override_format_field@>
<$if not isInfo and IsOverrideFormat$>
<$fieldIsOptionList = 1, optionListResultSet = "DocFormats", 
    optionListKey = "dFormat", 
    optionListValueInclude = "std_override_format_option_value", 
    addEmptyOption = 1, emptyOptionLabel = lc("wwEmptyFormatOption")$>
<$include std_display_field$>
<$endif$>
<@end@>
<@dynamichtml std_override_format_option_value@>
<$dDescription$>
<@end@>

Specifies the include to use to display options in an option list from a ResultSet:

<@dynamichtml std_resultset_option_list_item@>
<$curValue = getValue("#active", optionListKey)$>
<option value="<$curValue$>" <$if optionsAllowPreselect and strEquals(curValue, fieldValue)$>selected<$endif$>>
<$if optionListValueInclude$>
<$inc(optionListValueInclude)$>
<$else$>
<$curValue$>
<$endif$>
<@end@>

See Also


optionsAllowPreselect

Specifies that the metadata field option list can be prefilled with its last value.

Type and Usage

Output

Example

Specifies that the option list can be prefilled:

<$optionsAllowPreselect=1$>

Determines if the option list will be prefilled:

<$if optionsAllowPreselect and fieldValue$>
<$defaultOptionListScript = "<$optList " & optionListName & ":fieldValue$>"$>
<$else$>
<$defaultOptionListScript = "<$optList " & optionListName & ":noselected$>"$>
<$endif$>

optList()

Generates an option list.

This function is used extensively to create option lists on Content Server pages.

This function only produces output when used with a service that calls loadMetaOptionsList

Type and Usage

Parameters

Takes one parameter and one optional argument to the parameter:

The only parameter is a field name, option list key, or variable.

Output

Returns a list of values.

Example

This script generates a list of possible authors from the internal docAuthors list:

<$optList docAuthors$>

This script generates a list of the options specified in the xRegion custom metadata field:

<$optList xRegion.options$>

This script generates an option list from the variable optionListName and specifies the default value:

<$if optionsAllowPreselect and fieldValue$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":fieldValue$>"$>
<$else$>
    <$defaultOptionListScript = "<$optList " & optionListName & ":noselected$>"$>
<$endif$>

See Also


PageParent

Checks whether a directory page in the Library has a parent page.

Type and Usage

Output

Example

Checks if the directory page is a subfolder:

<$PageParent$>

parseDataEntryDate()

Parses a date but uses the failover logic for using the alternate parsing formats.

Dates convert to milliseconds when used with standard comparison operators. For example, the expression (60*60*1000) equals one hour.

A common usage of this function is to adjust the current time using a multiplication expression that represents a number of seconds, minutes, hours, or days.

Type and Usage

Parameters

The only parameter is an expression to be parsed.

Output

Returns a Java date object, which is converted to a string for display.

Example

<$parseDataEntryDate$>

parseDate

Parses a date/time to allow evaluation and arithmetic.

Dates convert to milliseconds when used with standard comparison operators. For example, the expression (60*60*1000) equals one hour.

A common usage of this function is to adjust the current time using a multiplication expression that represents a number of seconds, minutes, hours, or days.

Type and Usage

Parameters

The only parameter is an expression to be parsed.

Output

Returns a Java date object, which is converted to a string for display.

Example

Each of the following expressions returns the date and time one day in the past:

<$parseDate(dateCurrent(-1))$>
<$parseDate(dateCurrent()-(24*60*60*1000))$>
<$dateCurrent(-1)$>
<$dateCurrent()-(24*60*60*1000)$>

Returns the time one hour in the future. The first line adds one hour using a time multiplication expression, assigns that time and date to a custom variable, and suppresses the output. The second line references the custom variable and defines that only the time is displayed:

<$exec my_customParseTime parseDate(dateCurrent()+(1000*60*60))$>
<$formatTimeOnly(my_customParseTime)$>

Returns the date one year in the future. The first line adds one year using a time multiplication expression, assigns that time and date to a custom variable, and suppresses the output. The second line references the custom variable and defines that only the date in long format is displayed:

<$exec my_customParseTime parseDate(dateCurrent()+(1000*60*60*24*365))$>
<$formatTimeOnly(my_customParseTime)$>

This script evaluates whether the date seven days in the future is greater than the expiration date and returns a message to the user if true:

<$if dOutDate$>
    <$if dateCurrent(7) > parseDate(dOutDate)$>
Content item expires in one week.
     <$endif$>
<$endif$>

This script uses parseDate within a conditional statement for customized workflow jumps. The script specifies that if the last time we entered this step was four days ago, go to the first step in workflow wf_late and set the return step to be the next step:

<$if parseDate(wfCurrentGet("lastEntryTs")) < dateCurrent(-4)$>
    <$wfSet("wfJumpName", "lateJump")$>
    <$wfSet("wfJumpTargetStep", "step_1@wf_late")$>
    <$wfSet("wfJumpReturnStep", wfCurrentStep(1))$>
    <$wfSet("wfJumpEntryNotifyOff", "0")$>
<$endif$>

See Also


parseDateWithPattern()

Parses a date/time to a specified date/time pattern.

Dates convert to milliseconds when used with standard comparison operators. For example, the expression (60*60*1000) equals one hour.

A common usage of this function is to adjust the current time using a multiplication expression that represents a number of seconds, minutes, hours, or days.

Type and Usage

Parameters

Takes two parameters:

Output

Returns a Java date object, which is converted to a string for display.

Example

Displays the current date and time in the format specified by the pattern (for example, Wed, 4 Jul 2001 12:08:56 -0700):

<$parseDateWithPattern(<$dateCurrent()$>,"EEE, d MMM yyyy HH:mm:ss Z")$>

See Also


PATH_INFO

This setting is obsolete. The web server filter no longer sends this information.

Retrieves additional information about the file system path to the CGI computer.

When the virtual path is returned by the PATH_TRANSLATED variable, any additional information at the end of this path is also returned as PATH_INFO.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns the additional virtual path information as a string.

Example

Retrieves additional CGI path information:

<$PATH_INFO$>

See Also


PATH_TRANSLATED

Retrieves the file system path to the CGI computer, for example:

c:/domain/weblayout/idcplg/idc_cgi_isapi-idcm1.dll.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns the virtual path as a string.

Example

Retrieves the CGI path:

<$PATH_TRANSLATED$>

pneNavigation()

Enables the left sidebar navigation.

Type and Usage

Parameters

Set as a name/value pair:

pneNavigation=1

Default value is 1 (enabled).

To disable this function, it must be set to a null string.

Output

Evaluates to TRUE or FALSE.

Example

Enables the sidebar navigation:

<$pneNavigation=1$>

To force the sidebar navigation off, set it to a null string:

<$pneNavigation=""$>

Setting the definition to other than 1 or a null string value is invalid and will not disable the sidebar navigation:

<$pneNavigation=0$>

QUERY_STRING

Retrieves the string that follows the ? delimiter in the URL for a query.

This variable is specific to the current CGI request.

Type and Usage

Output

Returns the query information as a string.

Example

As information output on a page or to a log:

QUERY_STRING=IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=STD_QUERY_PAGE

As part of an Idoc Script statement or evaluation:

<$if QUERY_STRING$>
<!--statement-->

regexMatches()

Searches a string for a specific pattern using a regular expression to do matching. Regular expression constructs can contain characters, character classes, and other classes and quantifiers. For details about the Java API for Class Pattern, see http://www.oracle.com/technetwork/java/index.html.

This feature is only available with JVM 1.4 or later versions; this is the default version for WebCenter Content version 7.0 and later.

Type and Usage

Parameters

Takes two parameters:

Example

The following example returns FALSE, because the string does not match the expression:

<$regexMatches("abcdef","abc")$>

The following example returns TRUE because the wild cards are present. If standard wild cards such as the asterisk (*) were used instead of the dot-asterisk (.*) convention, the match would fail.

<$regexMatches("abcdef", ".*abc.*")$>

See Also


regexReplaceAll()

Searches a string for a specific pattern using a regular expression to do matching and replacing. Regular expression constructs can contain characters, character classes, and other classes and quantifiers. For details about the Java API for Class Pattern, see http://www.oracle.com/technetwork/java/index.html.

This feature is only available with JVM 1.4 or later versions; this is the default version for WebCenter Content version 7.0 and later.

It replaces all instances of the regular expression with the replacement string.

Type and Usage

Parameters

Takes three parameters:

Example

The following example returns xyzdef xyzdef:

<$regexReplaceAll("abcdef abcdef","abc","xyz")$>

See Also


regexReplaceFirst()

Searches a string for a specific pattern using a regular expression to do matching and replaces the first instance with a replacement string. Regular expression constructs can contain characters, character classes, and other classes and quantifiers. For details about the Java API for Class Pattern, see http://www.oracle.com/technetwork/java/index.html.

This feature is only available with JVM 1.4 or later versions; this is the default version for WebCenter Content version 7.0 and later.

Type and Usage

Parameters

Takes three parameters:

Example

The following example returns xyzdef abcdef:

<$regexReplaceFirst("abcdef abcdef","abc","xyz")$>

See Also


REMOTE_ADDR

Returns the IP address of the remote host making the request.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns the IP address as a string.

Example

As information output on a page or to a log:

REMOTE_ADDR=207.0.0.1

As part of an Idoc Script statement or evaluation:

<$if REMOTE_ADDR$>
<!--statement-->

See Also


REMOTE_HOST

Returns the name of the remote host making the request.

This variable is specific to the current gateway program request.

Type and Usage

Output

Example

As information output on a page or to a log:

REMOTE_HOST=207.0.0.1

As part of an Idoc Script statement or evaluation:

<$if REMOTE_HOST$>
<!--statement-->

See Also


REQUEST_METHOD

Retrieves the method that was used to make the request.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns the request method as a string.

Example

As information output on a page or to a log:

REQUEST_METHOD=GET

As part of an Idoc Script statement or evaluation:

<$if REQUEST_METHOD$>
<!--statement-->

requiredMsg

Specifies the error message to be displayed if a required metadata field does not have a value upon checkin.

Type and Usage

Output

Returns the error message as a string.

Example

Defines the required field error message for the dDocTitle metadata field as the wwSpecifyTitle localized string:

<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1, fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>

See Also


ResultsTitle

Defines a title for the search results page.

This variable is used by the Web Layout Editor to name the search results page and display a heading at the top of that page.

Usage

Output

Returns the page title as a string.

Example

As an HDA entry, names the search results page:

@Properties LocalData
ResultsTitle=Content Items
@end

As a script, returns the defined name:

<$if ResultsTitle$>ResultsTitle=<$url(ResultsTitle)$>

rptDisplayMapValue()

This function is meant for internal use only.

This function returns a localized string representation of an internal key code. These key codes are used to store status and state flags for content items. This function is used on the Content Information page and workflow pages to display descriptions of the internal state.

Type and Usage

Parameters

Takes two parameters:


rs()

This function returns a ResultSet given the name of the ResultSet. Because the actual object it returns is a ResultSet, certain actions can be performed on the return value that cannot be performed on the return values of other functions. In particular, the loop syntax can be applied to the result.

Type and Usage

Parameters

This function has one parameter, resultSetName, which is the name of the ResultSet to return.

Output

A ResultSet object if found, otherwise null.

Example

Suppose MyResultSet is the name of a ResultSet, then you could loop on the ResultSet using the following syntax:

<$loop rs("MyResultSet")$>... Script inside loop ...<$endloop$>

This function also can be used when temporarily assigning variables when calling Idoc Script functions. In particular, the following example will temporarily assign the variable rsParam to point to the same ResultSet as pointed to by MyResultSet for the duration of the call to include the resource include my_include. If the result of the rs function is assigned to a variable, then that variable will have a shared pointer to the ResultSet creating the same effect as if rsCreateReference were called.

<$inc("my_include", rsParam=rs("MyResultSet"))$>

rsAddFields()

Adds new fields to a ResultSet. This function will only add the field if it is not already present. Note that setValue(...) can also add new fields but it only works on ResultSets that are nonempty and are on a currently valid row.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$rsAddFields(rsName, fieldsList)$>

rsAddFieldsWithDefaults()

This function adds new fields to an existing ResultSet. Unlike rsAddFields, this function provides the ability to specify default values for any fields that are added. Note that rsAddFieldsWithDefaults never over-writes any data in fields that already exist; it only adds new fields to a ResultSet.

Type and Usage

Parameters

The following table lists parameters for the function.

Parameters Description

resultSetName

The name of the ResultSet.

newFields

A comma-separated list of fields to append to the ResultSet. Any specified fields that already exist in the ResultSet are ignored.

defaultValues

An optional comma-separated list of default values that are set for the new fields in each row. Each value in this list corresponds to the new field in the same spot of the list newFields. If you need to set a default value with a comma in it, you can use '^' as a comma. If the defaultValues list is longer or shorter than newFields list, then the function ignores the extra default values or uses the empty string for unspecified default values, respectively.


Output

Nothing.

Example

Adding fields

<$rsCreateResultSet("MyList", "field1,field2,field3")$><$rsAppendRowValues("MyList", "A,B,C,D,E,F")$><$rsAddFieldsWithDefaults("MyList", "field4,field5,field6")$>

In this basic example, we create a ResultSet named MyList, fill it with some values, then add three more fields to MyList, without setting default values. The resulting table will look like the following:

field1 field2 field3 field4 field5 field6

A

B

C

     

D

E

F

     

Adding fields with default

<$rsCreateResultSet("MyList", "field1,field2,field3")$><$rsAppendRowValues("MyList", "A,B,C,D,E,F")$><$rsAddFieldsWithDefaults("MyList", "field4,field5,field6", "X,Y,Z")$>

Here we define default values for the new fields. The resulting table will look like the following:

field1 field2 field3 field4 field5 field6

A

B

C

X

Y

Z

D

E

F

X

Y

Z


When a field already exists

<$rsCreateResultSet("MyList", "field1,field2,field3")$><$rsAppendRowValues("MyList", "A,B,C,D,E,F")$><$rsAddFieldsWithDefaults("MyList", "field1,field4,field5", "X,Y,Z")$>

In this case, we try and add a field that already exists in MyList. This action is completely ignored, and old field values are preserved. The resulting table will look like the following:

field1 field2 field3 field4 field5

A

B

C

X

Y

D

E

F

X

Y


Fewer default values specified

<$rsCreateResultSet("MyList", "field1,field2,field3")$><$rsAppendRowValues("MyList", "A,B,C,D,E,F")$><$rsAddFieldsWithDefaults("MyList", "field4,field5,field6", "X,Y")$>

Notice in this example how there are not enough default values in the default value list for all fields. In this case, it just fills in blanks for the unspecified column.

field1 field2 field3 field4 field5 field6

A

B

C

X

Y

 

D

E

F

X

Y

 

See Also


rsAddRowCountColumn()

This function adds a new field whose value for each row is the row count for that row. The count starts at 0. This function is useful to use just before using rsSort(...) on XML data island ResultSets (inside .hcsp files) so that the original row location can be preserved.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$rsAddRowCountColumn(rsName, countFieldName)$>

rsAppend()

This function is similar in nature to rsMerge, except there are no merge test criteria. All rows from the ResultSet rsNameSource are appended to the ResultSet rsNameTarget. In addition, all fields in rsNameSource not in rsNameTarget will be added to rsNameTarget. Useful for doing a simple combining of ResultSets.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$rsAppend("targetRsetName", "sourceRsetName")$>

See Also


rsAppendNewRow()

Appends a new row to the end of the ResultSet. The current row is not affected.

Type and Usage

Parameters

The only parameter is the name of the ResultSet to receive the new row.

Output

Example

<$rsAppendNewRow("SearchResults")$>

rsAppendRowValues()

A utility function for adding new rows to a ResultSet. The values list is a comma-delimited list of values (using the escape rule of ',' -> '^', '^' -> '#^', '#' -> '##' to encode each value) split up into rows. Assume nfields is the number of fields in the ResultSet. The values list is split up into rows by counting nfields values to create a new row and then taking the next nfields values to create each following row and so on. If the number of values is not an exact multiple of nfields then the last row has its fields values padded out with empty strings. This function is useful for compactly hard coding ResultSets using Idoc Script.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$rowValues = "a1, b1, a2, b2"$>
<$rsCreateResultSet("ResultSet1", "ColumnA,ColumnB")$>
<$rsAppendRowValues("ResultSet1", rowValues$>
<table border=2>
    <tr><td>ColumnA</td><td>ColumnB</td></tr>
    <$loop ResultSet1$>
    <tr><td><$ColumnA$></td><td><$ColumnB$></td>
</tr>
<$endloop$>
</table>

The resulting HTML would look like the following.

Column A Column B

Column A

Column B

A1

B1

A2

B2

   


rsCopyFiltered()

This function copies only selected rows from one ResultSet to create another ResultSet. Any prior ResultSet with name rsNameTarget will be replaced. The rows are selected by testing each row's value of filterField using a test against the pattern in filterPattern. The pattern match is the same as used in the Idoc Script like operator.

Type and Usage

Parameters

Takes four parameters:

Output

Example

<$rsCopyFiltered(rsNameSource, rsNameTarget, filterField, filterPattern)$>

rsCreateReference()

This function sets an Idoc Script variable with a shared reference to a pre-existing ResultSet in the request data.

Type and Usage

Parameters

This function has the following parameters.

Parameters Description

sourceResultSet

The name of a pre-existing ResultSet.

targetResultSet

The name of the variable that will share a reference to precisely the same ResultSet.


Output

If successful, returns TRUE.

Example

The current value of <$MyResultSet.field2$> and <$MyResultSetAlias.field2$> will both be the letter E.

<$rsCreateResultSet("MyResultSet", "field1,field2,field3")$>
<$rsAppendRowValues("MyResultSet", "A,B,C,D,E,F")$>
<$rsCreateReference("MyResultSet", "MyResultSetAlias")$>
<$rsNext("MyResultSetAlias")$>

rsCreateResultSet()

Creates a ResultSet initialized with the list of fields in fieldList. All the fields will be set as string type.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$rsCreateResultSet(rsName, fieldList)$>

rsDeleteRow()

Deletes the current row in the ResultSet. The current row is advanced to the next row (or points to after the end of the ResultSet if the end row in the ResultSet is deleted).

Type and Usage

Parameters

The only parameter is the name of the ResultSet whose current row is deleted.

Output

Example

<$rsDeleteRow("Folders")$>

rsDocInfoRowAllowDisclosure()

Checks if the current user is allowed to view the URL of the content item referenced by the current row of a ResultSet.

This function is useful for selectively showing the URLs of a ResultSet generated by a content item query.

Type and Usage

Parameters

The only parameter is the name of a ResultSet whose current row contains information about a content item.

Output

Example

Checks if the user can view the URL of the content item in the current row of resultSet1.

<$rsDocInfoRowAllowDisclosure("resultSet1")$>

rsExists()

Checks to see if a ResultSet exists.

Type and Usage

Parameters

Takes one parameter, the name of the ResultSet.

Output

Example

<$if rsExists("resultSet1")$>
    code to execute if TRUE
<$endif$>

rsFieldByIndex()

Retrieves the name of the field at a specified column index, starting from zero.

Type and Usage

Parameters

Takes two parameters:

Example

<$rsFieldName = rsFieldByIndex("resultSet1", "2")$>

rsFieldExists()

Checks to see if the named ResultSet contains the specific field.

Type and Usage

Parameters

Takes two parameters:

Output

Example

<$if rsFieldExists("resultSet1", "FieldName1")$>
    code to execute if TRUE
<$endif$>

rsFindRowPrimary()

Searches the first column of a ResultSet for a matching value.

Type and Usage

Parameters

Takes two parameters:

Output

Example

Searches the first column of resultSet1 until a value matching value1 is found.

<$rsFindRowPrimary("resultSet1","value1")$>

rsFirst()

Moves to the first row in a ResultSet.

Type and Usage

Parameters

The only parameter is the name of a ResultSet.

Output

Example

Advances the SearchResults ResultSet to the first row:

<$exec rsFirst("SearchResults")$>

rsInsertNewRow()

Inserts a row just before the current row of the ResultSet being manipulated. The new row then becomes the current row.

Type and Usage

Parameters

The only parameter is the name of the ResultSet in which to have a new row inserted.

Output

Example

<$rsInsertNewRow("SearchResults")$>

rsIsRowPresent()

Checks the status of the current row in a ResultSet.

Type and Usage

Parameters

Takes one parameter, the name of the ResultSet.

Output

Example

<$if rsIsRowPresent("resultSet1")$>
    code to execute if TRUE
<$endif$>

rsLoopInclude()

This function loops on a ResultSet, executing a resource include once for each row. During the execution of this include, the ResultSet is temporarily made active (as is done with the standard <$loop ...$> construction).

Type and Usage

Parameters

This function has the following parameters:

Parameters Description

ResultSetName

The name of the ResultSet to loop over.

includeName

The name of the resource include to execute.


Output

The combined output of the various iterations of the resource include.

Example

<$rsLoopInclude(resultSetName, includeName)$>

rsLoopSingleRowInclude()

This function temporarily promotes a ResultSet to be active while executing a single resource include. It functions much like rsLoopInclude, however the include is only executed once for the current row of the ResultSet.

Type and Usage

Parameters

This function has the following parameters.

Parameters Description

ResultSetName

The name of the ResultSet to make active.

includeName

The name of the resource include to execute.


Output

The output of the resource include.

Example

<$rsLoopSingleRowInclude(resultSetName, includeName)$>

See Also


rsMakeFromList()

Creates a single-column ResultSet from an option list.

Type and Usage

Parameters

Takes two required parameters and one optional parameter:

Output

Creates a ResultSet with one column, populated by the values in the specified option list.

Example

Creates two ResultSets called ListA and ListB from the securityGroups and docAuthors option lists:

<$lista = "securityGroups"$>
<$rsMakeFromList("ListA", lista)$>
<$rsMakeFromList("ListB", "docAuthors", "name")$>
<table border=2>
    <tr><td>Security Groups</td><td>Authors</td></tr>
    <tr>
        <td><$loop ListA$><$row$><br>
        <$endloop$></td>
        <td><$loop ListB$><$name$><br>
        <$endloop$></td>
    </tr>
</table>

The ResultSets would look like the following.

@ResultSet ListA
1
row
Public
Secure
@end
@ResultSet ListB
1
name
hchang
pkelly
sysadmin
user1
@end

The resulting HTML would look like the following.

ListA ListB

Security Groups

Authors

 

hchang

Public

okelly

Secure

sysadmin

 

user1


See Also


rsMakeFromString()

Creates a single-column ResultSet from a string.

Type and Usage

Parameters

Takes two required parameters and one optional parameter:

Output

Creates a ResultSet with one column, populated by the specified string values.

Example

Creates two ResultSets, called StringA and StringB:

<$stringa = "a,b,c,d"$>
<$rsMakeFromString("StringA", stringa)$>
<$rsMakeFromString("StringB", "A,B,C,D", "name")$>
<table border=2>
    <tr><td>StringA</td><td>StringB</td></tr>
    <tr>
        <td><$loop StringA$><$row$><br>
        <$endloop$></td>
        <td><$loop StringB$><$name$><br>
        <$endloop$></td>
    </tr>
</table>

The ResultSets would look like the following.

@ResultSet StringA
1
row
a
b
c
d
@end
@ResultSet StringB
1
name
A
B
C
D
@end

The resulting HTML would look like the following.

Stringa Stringb

A

A

B

B

C

C

D

D


See Also


rsMerge()

Merges the rows of one ResultSet into another. If the value from the rsNameSource ResultSet in the rsCommonField field matches the value for the same field in a row for rsNameTarget, then that row will be replaced. Otherwise, the row from rsNameSource will be appended. If there are multiple rows in rsNameTarget that are matched by the same value, then only the first row is replaced and it is replaced by the last row in rsNameSource that has a matching row. Any fields in the ResultSet rsNameSource that are not in rsNameTarget are added as new fields to rsNameTarget. This function is best performed on ResultSets that have only unique values in the rsCommonField field so that issues with multiple matches are avoided.

Type and Usage

Parameters

Takes three parameters:

Output

Example

<$rsMerge(rsNameTarget, rsNameSource, commonField$>

See Also


rsMergeDelete()

Analogous to rsMergeReplaceOnly, except matching rows in the ResultSet rsNameTarget are removed instead of replaced. It is useful for removing rows from one ResultSet that already occur in another.

Type and Usage

Parameters

Takes three parameters:

Output

Example

<$rsMergeDelete(rsNameTarget, rsNameSource, rsCommonField)$>

rsMergeReplaceOnly()

Similar to rsMerge, but rows are only replaced; none are appended to the ResultSet rsNameTarget. In addition, new fields from rsNameSource are not added to rsNameTarget.

Type and Usage

Parameters

Takes three parameters:

Output

Example

<$rsMergeReplaceOnly(rsNameTarget, rsNameSource, rsCommonField) $>

rsNext()

Moves to the next row in a ResultSet.

Type and Usage

Parameters

The only parameter is the name of a ResultSet.

Output

Example

Advances the SearchResults ResultSet to the next row:

<$exec rsNext("SearchResults")$>

rsNumFields()

Provides a count of the number of fields in a ResultSet. This is useful when combined with rsFieldByIndex.

Type and Usage

Parameters

Takes one parameter, the name of the ResultSet.

Output

Returns the number of fields.

Example

<$numFields = rsNumFields("resultSet1")$>

See Also


rsNumRows()

Provides a count of the number of rows in a ResultSet.

Type and Usage

Parameters

Takes one parameter, the name of the ResultSet.

Output

Returns the number of rows.

Example

<$numRows = rsNumRows("resultSet1")$>

rsRemove()

Removes a ResultSet.

Type and Usage

Parameters

Takes one parameter, the name of the ResultSet.

Example

<$rsRemove("resultSet1")$>

rsRename()

Renames a ResultSet.

If you use a variable to define the new ResultSet name, you will need to loop over the new ResultSet variable manually using rsFirst, rsNext, and #isRowPresent. For example:

<$rsNewName="MySearchResults"$>
<$rsRename("SearchResults", rsNewName)$>
    <$rsFirst(rsNewName)$>
    <$loopwhile getValue(rsNewName, "#isRowPresent")$>
        <!--output code-->
        <$rsNext(rsNewName)$>
    <$endloop$>

Type and Usage

Parameters

Takes two parameters:

Output

Example

Renames the SearchResults ResultSet to MySearchResults:

<$rsRename("SearchResults", "MySearchResults")$>

rsRenameField()

Renames a field in the ResultSet.

Type and Usage

Parameters

Takes three parameters:

Output

Example

Renames the invoice field to outlays in the warehouse ResultSet.

<$exec rsRenameField("warehouse", "invoice", "outlays")$>

rsSetRow()

Moves to a specified row in a ResultSet.

Type and Usage

Parameters

Takes two parameters:

Output

Example

Advances the SearchResults ResultSet to the 10th row:

<$exec rsSetRow("SearchResults",10)$>

rsSort()

Sorts a ResultSet by a particular column.

Type and Usage

Parameters

Takes four parameters. For example:

rsSort(rsName,sortCol,sortType,sortOrder)
Parameter Description

rsName

The name of the ResultSet.

sortCol

The name of the column to sort by.

sortType

The type of sort (defaults to int):

string: sort alphabetically

int: sort numerically

date: sort by date

sortOrder

The sort order (defaults to asc):

asc: ascending order

desc: descending order


Output

Example

Sorts the SearchResults ResultSet by Content ID in descending order:

<$rsSort("SearchResults","dDocName","string","desc")$>

rsSortTree()

Sorts a ResultSet that is a representation of an XML data structure (with nodes, parent nodes, and depth attributes).

Type and Usage

Parameters

Takes seven parameters. For example:

rsSortTree(rsName,itemIdCol,parentIdCol,nestLevelCol,sortCol,sortType,sortOrder)
Parameter Description

rsName

The name of the ResultSet.

itemIdCol

The name of the column that contains the unique ID for each node.

parentIdCol

The name of the column that contains the ID for the parent node, if one exists.

nestLevelCol

The name of the column that contains the nest level (depth) for each node.

sortCol

The name of the column to sort by.

sortType

The type of sort (defaults to int):

string: sort alphabetically

int: sort numerically

date: sort by date

sortOrder

The sort order (defaults to asc):

asc: ascending order

desc: descending order


Output

Example

Sorts the discussionPosts ResultSet by the itemNumber column in ascending order:

<$rsSortTree("discussionPosts", "discussionPosts!itemNumber", 
    "discussionPosts!parentNumber", "dpItemNestLevel", 
    "discussionPosts!itemNumber", "int", "asc")$>

SafeDir

Retrieves the location where extra Content Server files are moved by the Content Server Analyzer utility.

Default is a subdirectory in the log directory specified by the IdcAnalyzeLogDir setting.

This variable is not settable.

Type and Usage

Example

As script, returns the value of the configuration setting:

<$SafeDir$>

See Also


SCRIPT_NAME

Retrieves the relative path to the CGI linking file.

The CGI linking file is the executable file for the web server security filter, which is a different file for each operating system and web server. For example, the file name is nph-idc_cgi.exe for Solaris.

Type and Usage

Output

Returns the relative path as a string.

Example

As information output on a page or to a log:

SCRIPT_NAME=/idcplg/idc_cgi_isapi-instance>.dll

As part of an Idoc Script statement or evaluation:

<$if SCRIPT_NAME$>
<!--statement-->

SelfRegisteredAccounts

Defines the default accounts and permissions to be given to self-registered users.

This is a comma-delimited list.

Permissions for each account must be specified in parentheses after the account name.

The #none entry grants privileges to content items that have no account assigned. The #all entry grants privileges to all accounts.

There is no default value.

Returns the list of accounts as a string.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

As a configuration setting:

SelfRegisteredAccounts=#none(RWDA),USERS/<$NewUser$>,BOS(R)

As script, returns the defined account information as a string:

<$SelfRegisteredAccounts$>

See Also


SelfRegisteredRoles

Defines the default roles to be given to self-registered users.

This is a comma-delimited list.

There is no default value.

Returns the roles as a string.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

As a configuration setting:

SelfRegisteredRoles=guest,salesRole

As script, returns the defined roles as a string:

<$SelfRegisteredRoles$>

See Also


SERVER_NAME

Retrieves the hostname, DNS alias, or IP address of the web server as it would appear in a self-referencing URL.

This variable is not request-specific; it is set for all requests.

Type and Usage

Output

Returns the server information as a string.

Example

As information output on a page or to a log:

SERVER_NAME=centralserver

As part of an Idoc Script statement or evaluation:

<$if SERVER_NAME$>
<!--statement-->

SERVER_PORT

Retrieves the web server port number to which the request was sent.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns the port number as a string.

Example

As information output on a page or to a log:

SERVER_PORT=80

As part of an Idoc Script statement or evaluation:

<$if SERVER_PORT$>
<!--statement-->

SERVER_PROTOCOL

Returns the protocol and revision of the incoming request.

This variable is specific to the current gateway program request.

Type and Usage

Output

Returns a string in the format protocol/revision.

Example

As information output to a log:

SERVER_PROTOCOL=HTTP/1.0

As part of an Idoc Script statement or evaluation:

<$if SERVER_PROTOCOL$>
<!--statement-->

SERVER_SOFTWARE

This setting is obsolete for the 7.0 version and later.

The web server filter no longer sends this information.

Returns the name and version of the web server software that is answering the request.

This is also the server running the gateway.

This variable is not request-specific; it is set for all requests.

Type and Usage

Output

Returns a string in the format name/version.

Example

As information output on a page or to a log:

SERVER_SOFTWARE=Microsoft-IIS/4.0

As part of an Idoc Script statement or evaluation:

<$if SERVER_SOFTWARE$>
<!--statement-->

setContentType()

Sets the content type for the returned page so the browser renders it properly. For example, a content type (file-format type or MIME type) of text/plain, application/excel, or text/xml.

Type and Usage

Parameters

The only parameter is the content type.

Output

Example

<$setContentType("text/plain")$>

setCookie

Sets a cookie value in a browser.

Used to retain session information or information about anonymous users.

An expiration date can also be passed to make the cookie expire at a specified time.

Important:

Do not store secure data in a cookie. You should limit the use of cookies due to the risk of malicious users setting cookies on your site.

Type and Usage

Parameters

This function can take three parameters:

Example

The following example sets the cookie myCounter in the user's browser and increments the value when the user visits the page. The cookie will expire in one day.

<$myCounter=getCookie("myCounter")$>
<$if not myCounter$>
    <$myCounter=1$>
<$endif$>
Num times loaded: <$myCounter$>
<$setCookie("myCounter", myCounter+1, dateCurrent(1))$>

See Also


setExpires()

This function can be used to set an absolute time for an expiration of a page. This is best used for pages with a long life that may be requested frequently. Due to problems in time synchronization between the client and the server, it is not totally reliable, especially for short-lived caches. The data must follow one of the acceptable HTTP date formats.

Refer to the W3 Protocols for more information:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3

Type and Usage

Parameters

The only parameter is an absolute date, formatted in the manner HTTP requires, after which this page should be refreshed

Output

Example

This will cause the page to expire at the given absolute time. Note that all time stamps must be in the GMT time zone.

<$setExpires("Sat, 02 Aug 2003 24:00:00 GMT")$> 

This is a way to use other Idoc Script functions to set the expiration date to 14 days from the current date.

<$date=formatDateWithPattern(dateCurrent(14), "EEE, dd MMM yyyy")$>
<$setExpires(date & " 24:00:00 GMT"))$> >

See Also


setHttpHeader()

This function can be used to set any HTTP header. Values include, but are not limited to, Cache-Control, Content-Type, Last-Modified, or any of the other acceptable HTTP headers.

Refer to the W3 Protocols for more information:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3

Type and Usage

Parameters

Takes two parameters. For example:

setHttpHeader(headerName, headerValue)
Parameter Description

headerName

The name of a valid HTTP header.

headerValue

The value for the header.


Output

Example

This sets the content-type to XML, to enable your browser to render it with the passed XSLT.

<$setHttpHeader("Content-Type", "text/xml")$> 

See Also


setMaxAge()

This function can be used to set an absolute time for an expiration of a page. This is best used for pages with a long life that may be requested frequently. Due to problems in time synchronization between the client and the server, it is not totally reliable, especially for short-lived caches. The data must follow one of the acceptable HTTP date formats.

Refer to the W3 Protocols for more information:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3

Type and Usage

Parameters

The only parameter is the lifetime of this page in seconds.

Output

Example

This will expire the content of the page immediately:

<$setMaxAge(0)$> 

This will set the cache lifetime for this page to 10 minutes, and tell the browser that it absolutely must try to refresh the page after that time is up:

<$setMaxAge(600)$>
<$setHttpHeader("Cache-Control", "must-revalidate")$> 

See Also


setResourceInclude()

Defines an include.

This function allows dynamically constructed script to be assigned to an include (much as the eval function enables such script to be parsed and evaluated).

If the specified include already exists, the super keyword can be used in the new script to refer to the existing include.

Type and Usage

Parameters

Takes two parameters:

Output

Returns 0 if the include could not be parsed, 1 if it can be parsed.

Use exec to suppress this behavior.

Example

Uses the string "My name is resource include" to dynamically construct script:

<$setResourceInclude("my_name","My name is <$my_name$>")$>

Uses the super keyword to modify the std_display_field include:

<$myInclude="<span class='field'><$include super.std_display_field$></span>"
<$setResourceInclude("std_display_field",myInclude)$>

The following example suppresses the returned result:

<$exec setResourceInclude("std_display_field",myInclude)$>

setValue()

The target can either be #local or the name of a ResultSet. If the target is #local, then the parameter name identifies the name of a local data variable whose value is to be set by the parameter value. If the target area is nonempty and is not #local, then a field in a ResultSet named by the parameter target is being set. If the ResultSet exists and is currently on a valid current row, then that particular column's value (column named by the parameter name) on that row will be set with the value in the parameter value. If the field is currently not a part of that ResultSet, then the field will be added as a new column to the ResultSet and the value will be set. If the target ResultSet is not on a valid row, then this function will have no effect (but an internal exception will be reported on the server output). Note that this function should be contrasted with getValue.

Type and Usage

Parameters

Takes three parameters:

Output

Example

<$setValue(target, name, value)$>

SingleGroup

Evaluates if the current revision is in a contributor step of a Basic workflow.

Type and Usage

Output

Example

Evaluates if revision is in a contributor step:

<$if not SingleGroup$>

SourceID

Provides the Content ID for the current dynamic server page.

This variable returns the same value as ref:dID. For more information, see Section 3.6.4, "Metadata References in Dynamic Server Pages."

Type and Usage

Output

Returns the Content ID as a string.

Example

Sets the dID variable to the value of the current HCSF page:

<input type=hidden name="dID" value="<$SourceID$>">

StatusCode

Indicates if the last function call was successful or failed. This variable is set at the end of a service call.

Certain functions set this variable to zero (0) upon success.

Certain functions set this variable to a negative numeric value (-1) upon failure. Typically, the abortToErrorPage function is called to display an error page with the StatusMessage value from the most recent function call.

Type and Usage

Output

Example

Returns the current status code:

<$StatusCode$>

See Also


StatusMessage

Defines the error message for the last function call. This variable is set at the end of a service call, but it can be set during a service call.

This variable is typically displayed on an error page when the abortToErrorPage function is called.

Type and Usage

Output

Example

Returns the current status message:

<$StatusMessage$>

See Also


stdSecurityCheck()

Checks if the current user has access to the requested content item based on the standard security model.

The active data is checked to determine if the standard (or default) security model allows the user to have access to the content item. This enables a custom implementation of security to still execute the standard security model as a baseline.

Type and Usage

Parameters

None.

Output

Example

Compares the permission level of the user to the requested content item:

<$stdSecurityCheck()$>

strCenterPad()

Pads equal space on both sides of a string. An equal number of spaces is added to each side of the string to make it at least the specified length. A character will be added to the length of the string if required.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Returns a string with spaces on both sides.

Example

Pads equal space on each side and creates a string seven characters long, using the form <space><space>inf<space><space>:

<$strCenterPad("inf", 7)$>

Pads equal space on each side and creates a string nine characters long, using the form <space><space><space>inf<space><space><space>:

<$strCenterPad("inf", 8)$>

Pads equal space on each side and creates a string nine characters long, using the form <space><space><space>inf<space><space><space>:

<$strCenterPad("inf", 9)$>

strCommaAppendNoDuplicates()

This function appends a new token to an existing string. It returns the string plus a comma plus the new token. If the token already exists in the string, it is not added.

Type and Usage

Parameters

Takes two parameters:

Example

<$myString = strCommaAppendNoDuplicates(myString, "A")$>
<$myString = strCommaAppendNoDuplicates(myString, "B")$>
<$myString = strCommaAppendNoDuplicates(myString, "C")$>
<$myString = strCommaAppendNoDuplicates(myString, "A")$>
<$myString = strCommaAppendNoDuplicates(myString, "B")$>

strConfine()

Confines a string to a maximum length and appends padding if necessary.

If the string equals or is shorter than the specified length, it is unaffected.

If the string is longer than the specified length, it is shortened and three padding characters are appended to equal the specified length. The character used for padding can be specified by changing the StrConfineOverflowChars variable.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Returns a string.

Example

Confines the string and appends three padding characters (dots) to make it a string five characters long, using the form in<dot><dot><dot>:

<$strConfine("inform", 5)$>

Confines the string and appends padding characters (dots) to make it a string five characters long, using the form i<dot><dot><dot><dot>:

<$strConfine("i", 5)$>

Confines the string to a maximum of ten characters in length, so this six-character string is unaffected:

<$strConfine("inform", 10)$>

Confines the string to a maximum of six characters in length, so this six-character string is unaffected:

<$strConfine("inform", 6)$>

See Also


StrConfineOverflowChars

Defines a string padding character.

Defines the character used for padding by the strConfine Idoc Script function.

The default is a period (dot).

Type and Usage

Location

IntradocDir/config/config.cfg

Example

Used as a configuration entry:

StrConfineOverflowChars=.

See Also


strEquals()

Checks if two strings are equal, including case.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Example

Evaluates whether the strings are equal and returns TRUE (1):

<$strEquals("Home","Home")$>

Evaluates whether the strings are equal and returns FALSE (0):

<$strEquals("home","Home")$>

See Also


strEqualsIgnoreCase()

Checks if two strings are equal, not including case.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Example

Evaluates whether the strings are equal and returns TRUE (1):

<$strEqualsIgnoreCase("home","Home")$>

Evaluates whether the strings are equal and returns FALSE (0):

<$strEqualsIgnoreCase("home","page")$>

See Also


strGenerateRandom()

This function generates a random string of hexadecimal characters. It outputs as many characters as specified by the length parameter. If length is not specified, it defaults to 16 characters.

Type and Usage

Parameters

Takes the length of the string as a parameter.


strIndexOf()

Determines if one string is a substring of another.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Example

Evaluates whether xy is a substring of xyz and returns the index value 0:

<$if strIndexOf("xyz","xy") >=0$> check for substring <$endif$>

Evaluates whether yz is a substring of xyz and returns the index value 1:

<$if strIndexOf("xyz","yz") >=0$> check for substring <$endif$>

Evaluates whether ab is a substring of xyz and returns the index value –1 to indicate that this is not a substring:

<$if strIndexOf("xyz","ab") >=0$> check for substring <$endif$>

strLeftFill()

Fills the left side of a string with characters to make it a specified length.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes three parameters:

Output

Returns a string, left-filled with the specified character if necessary,.

Example

Formats the string sleep by left-filling with the character Z to ten spaces. This returns the string ZZZZZsleep:

<$strLeftFill("sleep",'Z',10)$>

Returns the string sleep:

<$strLeftFill("sleep",'Z',4)$>

strLeftPad()

Pads extra space to the left of a string to make it a specified length.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Returns a string, left-filled with spaces if necessary.

Example

Pads extra space on the left to make it a string five characters long, using the form <space><space>inf:

<$strLeftPad("inf", 5)$>

Returns the string information:

<$strLeftPad("information", 5)$>

strLength()

Evaluates the length of a string.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns an integer value.

Example

Evaluates the length of the string home and returns the integer 4:

<$strLength("home")$>

strLower()

Formats a string in all lowercase letters.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string in all lowercase letters.

Example

Evaluates the string Home and returns home.

<$strLower("Home")$>

strRemoveWs()

Removes empty spaces from a string.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string with no spaces.

Example

Formats the string h o m e as the string home:

<$strRemoveWs("h o m e")$>

strReplace()

Replaces an existing substring with another substring.

If there are multiple occurrences of the substring to be replaced, they will all be replaced by the new substring.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes three parameters:

Output

Returns a string.

Example

Replaces the word classified with restricted and results in the string This document is restricted.

<$strReplace("This document is classified.","classified","restricted")$>

Replaces the slashes in the date with periods, giving a date in the form 6.20.2001:

<$strReplace(formatDateOnly(dateCurrent()),"/",".")$>

strReplaceIgnoreCase()

Replaces an existing substring with another substring, performing the search without using case sensitivity.

If there are multiple occurrences of the substring to be replaced, they will all be replaced by the new substring.

Type and Usage

Parameters

Takes three parameters:

Output

Returns a string.

Example

<$hello = "Hello world! I love the world!"$>
<$strReplaceIgnoreCase(hello, "WORLD", "universe")$>

strRightFill()

Fills the right side of a string with characters to make it a specified length.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes three parameters:

Output

Returns a string, right-filled with the specified character if necessary,.

Example

Formats the string sleep by right filling with the character Z to ten spaces. This returns the string sleepZZZZZ:

<$strRightFill("sleep",'Z',10)$>

Returns the string sleep:

<$strRightFill("sleep",'Z',4)$>

strRightPad()

Pads extra space to the right of a string to make it a specified length.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes two parameters:

Output

Returns a string, right-filled with spaces if necessary.

Example

Pads extra space on the right to make it a string five characters long, using the form inf<space><space>:

<$strRightPad("inf", 5)$>

Returns the string information:

<$strRightPad("information", 5)$>

strSubstring()

Retrieves a substring from a string.

The first character has an index value of 0.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

Takes either two or three parameters:

Output

Returns a substring.

Example

Retrieves the first two characters of the string my:

<$strSubstring("mystring",0,2)$>

Retrieves the string after the second character string:

<$strSubstring("mystring",2)$>

See Also


strTrimWs()

Removes spaces from the beginning and end of a string.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string with no leading or trailing spaces.

Example

Formats the string " homepage " as the string homepage:

<$strTrimWs(" homepage ")$>

strUpper()

Formats a string in all uppercase letters.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string in all uppercase letters.

Example

Evaluates the string Home and returns HOME.

<$strUpper("Home")$>

SysAdminAddress

Defines the system administrator e-mail address.

This is the address used in workflow and subscription notification e-mails that come from the Content Server instance.

Returns a string.

There is no default value.

Type and Usage

Location

Example

As a configuration setting:

SysAdminAddress=admin@example.com

As script, returns the value of the configuration setting:

<$SysAdminAddress$>

See Also


TemplateClass

Retrieves the classification of the template for the current page.

This variable makes it possible to create conditional content in a template based on the identity of the template. Use this variable within a template page to determine the source of the pages delivered by the server.

For standard templates, this variable is defined in the class column of the IntradocTemplates table in the templates.hda file.

For search results templates, this variable evaluates to Results.

For report templates, this variable evaluates to Reports.

For dynamic server pages, this variable is typically IdcDynamicFile.

Type and Usage

Output

Returns a string.

Example

This markup displays a table of template information on the page:

<TABLE>
    <TR><TD>Template Name</TD>
    <TD><$TemplateName$></TD></TR>
    <TR><TD>Template Class</TD>
    <TD><$TemplateClass$></TD></TR>
    <TR><TD>Template Type</TD>
    <TD><$TemplateType$></TD></TR>
    <TR><TD>Template File Path</TD>
    <TD><$TemplateFilePath$></TD></TR>
</TABLE>

See Also


TemplateFilePath

Retrieves the path from where the template was actually loaded.

This variable makes it possible to create conditional content in a template based on the identity of the template. Use this variable within a template page to determine the source of the pages delivered by the server.

Type and Usage

Output

Returns the path as a string.

Example

This markup displays a table of template information on the page:

<TABLE>
    <TR><TD>Template Name</TD>
    <TD><$TemplateName$></TD></TR>
    <TR><TD>Template Class</TD>
    <TD><$TemplateClass$></TD></TR>
    <TR><TD>Template Type</TD>
    <TD><$TemplateType$></TD></TR>
    <TR><TD>Template File Path</TD>
    <TD><$TemplateFilePath$></TD></TR>
</TABLE>

See Also


TemplateName

Retrieves the internal name of the template for the current page. For example, DOC_INFO or CHECKIN_NEW_FORM.

This variable makes it possible to create conditional content in a template based on the identity of the template. Use this variable within a template page to determine the source of the pages delivered by the server.

Type and Usage

Output

Returns the template name as a string.

Example

This markup displays a table of template information on the page:

<TABLE>
    <TR><TD>Template Name</TD>
    <TD><$TemplateName$></TD></TR>
    <TR><TD>Template Class</TD>
    <TD><$TemplateClass$></TD></TR>
    <TR><TD>Template Type</TD>
    <TD><$TemplateType$></TD></TR>
    <TR><TD>Template File Path</TD>
    <TD><$TemplateFilePath$></TD></TR>
</TABLE>

See Also


TemplateType

Provides the template type for the current page.

This variable makes it possible to create conditional content in a template based on the identity of the template. Use this variable within a template page to determine the source of the pages delivered by the server.

For standard templates, this variable is defined in the formtype column of the IntradocTemplates table in the templates.hda file.

For search results templates, this variable is defined in the formtype column of the SearchResultTemplates table in the templates.hda file.

For report templates, this variable is defined in the datasource column of the IntradocReports table in the reports.hda file.

For dynamic server pages, this variable is either hcsp or hcsf.

Type and Usage

Output

Returns the template type as a string.

Example

This markup displays a table of template information on the page:

<TABLE>
    <TR><TD>Template Name</TD>
    <TD><$TemplateName$></TD></TR>
    <TR><TD>Template Class</TD>
    <TD><$TemplateClass$></TD></TR>
    <TR><TD>Template Type</TD>
    <TD><$TemplateType$></TD></TR>
    <TR><TD>Template File Path</TD>
    <TD><$TemplateFilePath$></TD></TR>
</TABLE>

See Also


toInteger()

Converts a string to an integer.

Note:

For string concatenation, string inclusion, and simple comparison, use the string operators described in Section 3.5.2, "Special String Operators."

Type and Usage

Parameters

The only parameter is the string.

Output

Returns an integer value. If the string does not evaluate to a number, or evaluates to a non-integer number, an error is thrown.

Example

Converts the string 4 to an integer and returns the value 4:

<$toInteger("4")$>

trace()

Enables logging a debug or trace message to the IsPageDebug output. A message can also be output to the console or to the system logs.

Type and Usage

Parameters

Takes one required and two optional parameters:

Example

The following example logs the string message to the system console, which is always logged:

<$trace("message", "#console")$>

The following example logs the string message to the system console in the pagecreation tracing section.

<$trace("message", "#console", "pagecreation")$>

The following example logs the string message to the HTML Content Server log file.

<$trace("message", "#log")$>

The following example dumps all local variables and their values to the system console.

<$trace("#local", "#console")$>

The following example dumps all local variables, ResultSets, and environment variables to the system console.

<$trace("#all", "#console")$>

The following example dumps all data to the variable MyTraceDump, which can then be displayed on the page. This is useful for HCSP developers who may not have the appropriate access rights to view the console logs.

<$trace("#all", "MyTraceDump")$>
<$MyTraceDump$>

See Also


UploadApplet

Enables the multiple file Upload Applet.

Important:

This setting is only for use by custom legacy versions of the Upload Applet. It should not be enabled when the standard MultiUpload variable is enabled.

When set to TRUE, the Upload Applet is enabled so that multiple files can be zipped and checked in as a single content item.

When set to FALSE, the Upload Applet is disabled.

Default is FALSE.

Type and Usage

Location

IntradocDir/config/config.cfg

Example

As a configuration setting, enables the Upload Applet:

UploadApplet=true

As script, evaluates the condition of the Upload Applet:

<$UploadApplet$>

See Also


url()

Formats a string for use in a URL.

This function converts blank spaces and reserved characters to an escape sequence.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string formatted for use in a URL.

Example

Formats the string home page as home%20page:

<$url("home page")$>

Formats the string home/page as home%2fpage:

<$url("home/page")$>

Formats the string home?page as home%3fpage:

<$url("home?page")$>

urlEscape7Bit()

This function returns a URL-encoded version of the string parameter. This is similar to the url function but it only encodes characters that are not 7-bit clean (ASCII). Therefore this function can be called repeatedly on the same string.

If the url function is used to double encode a string, every % character is encoded to %25.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string formatted for use in a URL.

Example

<$path = "mÿ fïlë.txt"$>
20fïlë.txt = <$url(path)$>
mÿ%2520fïlë.txt = <$url(url(path))$>
m%ff%20f%efl%eb.txt = <$urlEscape7Bit(url(path))$>
m%ff%20f%efl%eb.txt= <$urlEscape7Bit(urlEscape7Bit(url(path)))$>

See Also


UseHtmlOrTextHighlightInfo

Checks whether full-text search keyword highlighting is enabled and the file format supports highlighting (such as PDF, HTM, or TXT).

If the EnableDocumentHighlight setting is TRUE, keyword highlighting is enabled.

Type and Usage

Output

Example

Returns search keyword highlighting status:

<$UseHtmlOrTextHighlightInfo$>

See Also


UserAccounts

Retrieves a comma-delimited list of accounts the current user is assigned to.

Type and Usage

Output

Returns the account list as a string.

Example

For example:

UserAccounts=BOS,SEA,MSP/Gen

This markup displays user variables on a page:

<$if UserName$>
    Logon Name: <$UserName$><BR>
    User Name: <$UserFullName$><BR>
    E-mail Address: <$UserAddress$><BR>
    Accounts: <$UserAccounts$><BR>
<$endif$>

UserAddress

Retrieves the email address of the current user.

Type and Usage

Output

Returns the email address as a string.

Example

This markup displays user variables on a page:

<$if UserName$>
    Logon Name: <$UserName$><BR>
    User Name: <$UserFullName$><BR>
    E-mail Address: <$UserAddress$><BR>
    Default Account: <$UserDefaultAccount$><BR>
<$endif$>

UserAppRights

Checks the application rights of the current user.

Type and Usage

Output

Returns a bit flag number specifying the user's rights:

Admin Application Bit Flag

User Admin

1

Web Layout Editor

2

Repository Manager

4

Workflow Admin

8

Configuration Manager

16

Archiver

32


Example

Displays application rights of the current user:

<$UserAppRights$>

For example, the following combinations would result in the following numbers:

See Also


UserDefaultAccount

Retrieves the default account for the current user.

Type and Usage

Output

Returns the account name as a string.

Example

This markup displays user variables on a page:

<$if UserName$>
    Logon Name: <$UserName$><BR>
    User Name: <$UserFullName$><BR>
    E-mail Address: <$UserAddress$><BR>
    Default Account: <$UserDefaultAccount$><BR>
<$endif$>

UserFullName

The full name of the current user.

Type and Usage

Output

Example

This markup displays user variables on a page:

<$if UserName$>
    Logon Name: <$UserName$><BR>
    User Name: <$UserFullName$><BR>
    E-mail Address: <$UserAddress$><BR>
    Default Account: <$UserDefaultAccount$><BR>
<$endif$>

userHasAccessToAccount()

This function returns TRUE if the user has access to a named account at a specific privilege level. The privilege is a one-character representation of the access level, as follows:

Type and Usage

Parameters

Takes two parameters:

Output

Example

Evaluates whether the user has Read access to the specified account:

<$userHasAccessToAccount("profile_account", 1)$>

Evaluates whether the user has Read and Write access to the specified account:

<$userHasAccessToAccount("profile_account", 3)$>

userHasGroupPrivilege()

This function returns TRUE if the user has the specified privilege to the specified group. The privilege is a one-character representation of the access level, as follows:

Type and Usage

Parameters

Takes two parameters:

Output

Example

Evaluates whether the user has the specified role:

<$userHasGroupPrivilege("Public", "R")$>
<$userHasGroupPrivilege("Secure", "A")$>

userHasRole()

Checks if the current user has a particular role.

Type and Usage

Parameters

The only parameter is the name of a role.

Output

Example

Evaluates whether the user has the specified role:

<$userHasRole("admin")$>

UserIsAdmin

Checks if the current user has rights to any administration applets.

Type and Usage

Output

Example

Evaluates administrative rights of user:

<$UserIsAdmin$>

See Also


UserLanguageID

Returns the two-letter code that represents the user's preferred language, as in en for English, fr for French, or ja for Japanese.

This is useful when constructing URLs to localized content.

Type and Usage

Output

Returns the code for the preferred language.


UserLocaleId

Returns the full name for a user's locale, as in English-US, English-UK or Japanese.

The locale contains information about language, date, and number formatting.

Type and Usage

Output

Returns the name of the preferred language.


UserName

Retrieves the username of the current user.

Type and Usage

Output

Example

This markup displays user variables on a page:

<$if UserName$> Logon Name: <$UserName$><BR>
    User Name: <$UserFullName$><BR>
    E-mail Address: <$UserAddress$><BR>
    Default Account: <$UserDefaultAccount$><BR>
<$endif$>

UserRoles

Retrieves a comma-delimited list of roles the current user belongs to.

Type and Usage

Output

Returns the user role list as a string.

Example

For example:

PublicContributor,ClassifiedConsumer

References the list of user roles:

<$if UserRoles$>
    <$include optional_field$>
<$endif$>

UseSSL

Enables the secure sockets layer (SSL).

Default is FALSE.

Type and Usage

Location

Example

As a configuration setting, enables SSL:

UseSSL=true

As script, returns the value of the configuration setting:

<$UseSSL$>

See Also


UseXmlUrl

Checks if search keyword highlighting for XML documents is enabled. When set to TRUE, an XML URL is constructed when performing a keyword search.

Type and Usage

Output

Example

Returns the status of search keyword highlighting for XML documents.

<$UseXmlUrl$>

See Also


utGetValue()

Returns the value of a user property from a specified personalization (user topic) file.

User topic files are HDA files that are located in the IntradocDir/data/users/profiles/us/username/ directories.

Type and Usage

Parameters

Takes two parameters:

Output

Returns the value of the property in the specified user topic file.

Example

Returns the value of the emailFormat property in the current user's pne_portal.hda file:

<$utGetValue("pne_portal","emailFormat")$>

See Also


utLoad()

Loads a personalization (user topic) file so it is available for use by the utGetValue and utLoadResultSet functions.

User topic files are HDA files that are located in the IntradocDir/data/users/profiles/us/username/ directories.

Type and Usage

Parameters

The only parameter is the name of a user topic HDA file.

Example

Loads the current user's wf_in_queue.hda file and makes it available to other user topic functions:

<$utLoad("wf_in_queue")$>

See Also


utLoadDocumentProfiles()

Used to retrieve information about a user's current My Check In and My Search links for content profiles.

Type and Usage

Parameters

Takes two parameters:

Example

<$utLoadDocumentProfiles("pne_portal", "PneDocumentProfiles")

See Also


utLoadResultSet()

Loads a ResultSet specified in a personalization (user topic) file into the DataBinder.

User topic files are HDA files that are located in the IntradocDir/data/users/profiles/us/username/ directories.

Type and Usage

Parameters

Takes two parameters:

Output

Example

Loads the SavedQueries ResultSet from the current user's pne_portal.hda file into the DataBinder:

<$utLoadResultSet("pne_portal","SavedQueries")$>

See Also


valueStyle

Specifies the style of the value for the metadata field.

The following SPAN styles are typically used for values. They are defined in the std_style_declaration include in the WC_CONTENT_ORACLE_HOME/shared/config/resources/std_page.htm resource file:

Type and Usage

Output

Returns the name of the value style.

Example

Sets the value style:

<$if isFieldInfoOnly$>
    <$if valueStyle$>
        <$fieldValueStyle = valueStyle$>
    <$else$>
        <$fieldValueStyle = "tableEntry"$>
    <$endif$>
<$endif$>

Uses the xxsmall style for the field value when the Download applet is used:

<$if useDownloadApplet$>
    <$valueStyle="xxsmall", fieldValue = strTrimWs(inc("download_file_by_    applet_form_content"))$>
<$else$>
    <$fieldValue = strTrimWs(inc("doc_file_get_copy"))$>
<$endif$>

See Also


wfAction

Retrieves the action that is currently being performed on the revision.

Type and Usage

Output

Returns the name of the action as a string.

Example

If the revision is in the process of being rejected, notify the original author:

<$if wfAction like "REJECT"$>
    <$wfSet("wfJumpName", "notifyAuthor")$>
    <$wfSet("wfJumpEntryNotifyOff", "0")$>
    <$wfNotify(dDocAuthor, "user")$>
<$endif$>

If the revision is currently being approved but the metadata value of xDept is not HR, terminate the approval and display an error page:

<$if wfAction like "APPROVE" and not(xDept like "HR")$>
    <$abortToErrorPage("The revision is not in HR.")$>
<$endif$>

wfAddActionHistoryEvent()

Inserts an event into the WorkflowActionHistory table, in the workflow's companion data. The three parameters to this function are required. The rest of the row's values are computed or inherited from local data.

Type and Usage

Parameters

Takes three parameters:

See Also


wfAdditionalExitCondition

Retrieves the exit condition that has been defined for the current step.

Type and Usage

Output

Returns the exit condition as a string.

Example

The following code in the IdcHomeDir/resources/core/templates/workflow_info.htm template page is used to display the exit condition on the Workflow Step Information page:

<$wfDisplayCondition(dWfName, currentStepName, "wfAdditionalExitCondition")$>

Typical exit condition output for this variable would look like:

dSecurityGroup like "Secure"

wfAddUser()

Adds a user, alias, or workflow token to the list of reviewers for a workflow step. This function can only be used inside a token.

Type and Usage

Parameters

Takes two parameters:

Example

Adds the user mjones as a reviewer:

<$wfAddUser("mjones", "user")$>

Adds the original author token and the hr alias as reviewers:

<$wfAddUser(dDocAuthor, "user")$>
<$wfAddUser("hr", "alias")$>

wfComputeStepUserList()

Computes the list of users from the current step in the workflow.

Type and Usage

Output

Returns a comma-delimited list of users.

See Also


wfCurrentGet()

Retrieves a local state value from the companion file.

Type and Usage

Parameters

The only parameter is the key.

Output

Returns the local state value from the companion file.

Example

Returns the value of the local key <step_name>@<workflow_name>.myKey:

<$wfCurrentGet("myKey")$>

See Also


wfCurrentSet()

Sets the local state value of a key in the companion file.

Type and Usage

Parameters

Takes two parameters:

Example

Sets the key <step_name>@<workflow_name>.myKey to myValue:

<$wfCurrentSet("myKey", "myValue")$>

See Also


wfCurrentStep()

Retrieves the name of a step relative to the current step.

Type and Usage

Parameters

The only parameter is an integer that represents the number of steps relative to the current step.

Output

Example

Returns the current step name:

<$wfCurrentStep(0)$>

Returns the previous step name:

<$wfCurrentStep(-1)$>

Returns the next step name:

<$wfCurrentStep(1)$>

To actually move to the next step you must set up a jump, as in this example:

<$wfSet("wfJumpName", "move to next step")$> 
<$wfSet("wfJumpTargetStep", wfCurrentStep(1))$> 
<$wfSet("wfJumpEntryNotifyOff", "0")$>

wfDisplayCondition()

Retrieves the exit condition for a workflow step.

Type and Usage

Parameters

Takes three parameters:

Output

Returns the exit condition expression.

Example

The following code in the IdcHomeDir/resources/core/templates/workflow_info.htm template page is used to display the exit condition on the Workflow Step Information page:

<$wfDisplayCondition(dWfName, currentStepName, "wfAdditionalExitCondition")$>

where:


wfExit()

Exits a workflow step. This function moves the revision to a particular step in a workflow according to the function parameters and resets the parent list information. To completely exit a workflow, use wfExit(100,100) or any parameters that ensure that the revision returns to the parent workflow and then gets moved past the last step in that workflow.

Type and Usage

Parameters

Takes two parameters:

Example

Exits to the parent step in the workflow:

<$wfExit(0,0)$>

Returns to the previous jump step:

<$wfExit(1,0)$>

Returns to the previous jump step and moves to the next step in that workflow:

<$wfExit(1,1)$>

wfGet()

Retrieves a state value from the companion file.

Type and Usage

Parameters

The only parameter is the state key.

Output

Returns the state value from the companion file.

Example

Returns the current jump name:

<$wfGet("wfJumpName")$>

See Also


wfGetStepTypeLabel

This function takes an internal workflow step type value and turns it into a human-readable label. For example, :C:CA:CE: is the three states :C: (contribution), :CA: (autocontribute or original author step) and :CE: (Edit revision). After application of the Idoc Script function, the label might become "Auto Contributor, Edit Revision".

Here are the possible current states.

States Description

:CA:

Auto contribution step or step that occurs before all administrator defined workflow steps ("original author handles document rejection").

:CE:

Edit current revision. All edits replace current revision.

:CN:

Create new revision. All edit create new revision.

:R:

Review. Document can be approved or rejected.

:C:

Contribution. The document can be edited.


A workflow document step state has all the states that are true for it combined as a single fields with multiple values separated by colons (:) (redundant colons are eliminated). So a contributor/reviewer step that creates new revisions would have the state :R:C:CE:. Order does not matter. But :C: must be present even though it can be presumed by the presence of :CE: (:CE: also implies that the step is a contributor step). The value :C: accurately describes one capability of the current workflow step and the Content Server system does not chase implication rules (:CE: -> :C:) so the Content Server system will see the absence of :C: (even with :CE: present) as a statement that the workflow step does not allow core contributor types of activities (such as checkout or undo checkout).

Type and Usage

Parameters

The only parameter is the internal workflow step type value.

Example

<$wfGetStepTypeLabel(stepType)$>

wfIsFinishedDocConversion()

Indicates if the document will not be in GENWWW after the current action finishes.

If this Idoc Script function returns true, the conversion process has finished and the content item is no longer in GENWWW.

Type and Usage

Output

Example

<$wfIsFinishedDocConversion()$>

wfIsNotificationSuppressed()

Returns TRUE if this workflow is currently suppressing all workflow notifications for this particular workflow event. Suppression includes notification into both the workflow in queue and e-mail until either the current action is ended or the wfSetSuppressNotification function is used to re-enable notification.

Suppression of notifications is temporary. If notification is enabled or allowed to remain on for a later workflow action, all notifications that were not sent out for the current step are then sent out and workflows in queues are appropriated updated.

Type and Usage

Output

Example

<$wfIsNotificationSuppressed()$>

See Also


wfIsReleasable()

Indicates if the document is released as far as the workflow is concerned. The document may be still in GENWW or DONE, but if this Idoc Script function returns true, then the workflow is not preventing the release of the document. If it returns false, then the document will not be released until the workflow allows it to be released. This Idoc Script function takes no parameters. It evaluates the active release state value for any document info that may be present (in Idoc Script terms it checks if #active.dReleaseState is not the value E).

Type and Usage

Output

Example

<$wfIsReleasable()$>

wfJumpEntryNotifyOff

Turns the jump entry notification on and off.

Type and Usage

Output

Returns TRUE or FALSE.

Example

The following code sets the step entry notification to 0, which means that reviewers will be notified upon jump entry:

<$wfSet("wfJumpEntryNotifyOff","0")$>

wfJumpMessage

Defines a message that will be included in the notification e-mail that is sent to users when a jump is entered.

Type and Usage

Output

Returns the message as a string.

Example

The following code includes the message This is the message text in the e-mail message that notifies users upon jump entry:

<$wfSet("wfJumpMessage","This is the message text")$>

See Also


wfJumpName

Retrieves the name of the current jump.

Type and Usage

Output

Returns the jump name as a string.

Example

The following code sets the name of the current jump to MyJump:

<$wfSet("wfJumpName","MyJump")$>

wfJumpReturnStep

Retrieves the name of the step in the parent workflow that the revision returns to upon exiting a workflow after the current jump.

Type and Usage

Output

Returns the step name as a string.

Example

The following code sets the return step to be the next step in the parent workflow:

<$wfSet("wfJumpReturnStep",wfCurrentStep(1))$>

wfJumpTargetStep

Retrieves the name of the step the revision will jump to if the condition is met.

The target step can be referred to symbolically (such as wfCurrentStep(1)) or explicitly (such as MyStep@MyWorkflow). It is strongly recommended that you use symbolic references in step event scripts. They make the script easier to modify and reuse.

Type and Usage

Output

Returns the step name as a string.

Example

The following code sets the target step explicitly. When the jump criteria is met, the revision jumps to a step named step_1 in the Marketing workflow:

<$wfSet("wfJumpTargetStep","step_1@Marketing")$>

The following code sets the target step symbolically. When the jump criteria is met, the revision jumps to the first step in the current workflow:

<$wfSet("wfJumpTargetStep",WfStart)$>

wfLoadDesign()

This function is used to obtain information about the existing steps in a workflow or about exit conditions in a workflow.

This function loads the IntradocDir/data/workflow/design/workflowname.hda file and returns a ResultSet containing design information for a workflow. The workflowname value corresponds to the value for the dWfName variable, usually available on workflow pages, email templates, and jump scripts.

Type and Usage

Parameters

Takes one parameter, the name of the workflow.

Output

Returns the information as a ResultSet.

Example

<$wfLoadDesign(WorkflowName)$>

wfMailSubject

Defines the subject line of a workflow e-mail notification.

If no subject line is specified, the e-mail will use the default subject for the type of notification (review, reject, or workflow started).

Idoc Script can be included in the subject string.

Type and Usage

Output

Returns the subject line as a string.

Example

Notifies the original author with the subject line "Content ID has been released":

<$wfMailSubject="File <$dDocName$> has been released"$>
<$wfNotify(dDocAuthor, "user")$>

See Also


wfMessage

Defines a message that will be included in a workflow e-mail notification.

If no message is specified, the e-mail will use the default message for the type of notification (review, reject, or workflow started).

Idoc Script can be included in the message string.

Type and Usage

Output

Returns the message as a string.

Example

Notifies the original author with the message "Content ID has been released":

<$wfMessage="File <$dDocName$> has been released"$>
<$wfNotify(dDocAuthor, "user")$>

See Also


wfNotify()

Sends an e-mail message to a specified user, alias, or workflow token.

The wfMailSubject and wfMessage variables can be set to customize the notification message.

Type and Usage

Parameters

Takes two parameters and an optional third parameter:

Example

Notifies the original author:

<$wfNotify(dDocAuthor, "user")$>

Notifies all users in the myAlias alias, using the IdcHomeDir/resources/core/templates/reject_mail.htm file as a template:

<$wfNotify("myAlias", "alias", "WF_REJECT_MAIL")$>

See Also


wfParentList

Retrieves a list (parent list) of the workflow steps that the revision has visited. This tells the system where jumps occurred and how to unwind the steps during an error, a reject, or an exit.

This variable can be used to create conditional statements, but it should not be hard-coded or altered.

If the parent list is unwound due to an error, reject, or exit, steps are removed from the list, so the parent list may not reflect the complete step history.

The parent list is global, and is not localized with a step name.

Steps in the parent list are listed with the most recent step first. Steps are separated with a pound sign (#). An asterisk before a step name indicates that it is a jump step. For example:

Step_B@Workflow_2#*Step_A@Workflow_2#Step_1@Workflow_1

Type and Usage

Output

Returns the parent list as a string.

Example

One use for the parent list is to simulate the jumps that a content item has visited when you are testing a workflow script. For example, on the Test tab or the Edit Script screen, selecting a content item and clicking Load Item's Workflow State could result in the following line:

wfParentList=step_1@Marketing#contribution@Marketing

wfReleaseDocument

Causes a workflow to release all outstanding document revisions for a document that are currently being locked by the workflow. Such released revisions are free to be evaluated by the indexing engine and one of the released revisions may be full-text indexed as a result.

This function can only be used in the context of the evaluation of Idoc Script for a workflow step going through a workflow event. The function will have no effect if the document has already been released by the workflow. Note that this function does not cause the document to exit workflow.

Any new revision that is created for the document will be back in a "locked" (unreleasable) state. In other words, this function releases current revisions but has no implications for any new revision that may be created. This function takes no parameters and returns no result. It acts on the current active workflow document.

Type and Usage

Example

<$wfReleaseDocument()$> 

wfSet()

Sets a key with a particular value in the companion file.

Type and Usage

Parameters

Takes two parameters:

Example

Sets the key wfJumpName to MyJump:

<$wfSet("wfJumpName", "MyJump")$>

See Also


wfSetSuppressNotification()

Sets an internal flag indicating if workflow notification will be sent out during the current action (check in, update, resubmit, and so on).

The suppression is on both e-mail and updates to the workflow in queue. An additional use for this function is to suppress workflow notification until after a document has been converted. This prevents a document from advancing out of the auto-contributor workflow step when the document finishes a conversion.

Type and Usage

Parameters

Takes one parameter, the internal flag. If set to 1 (TRUE), notifications are suppressed. If set to 0 (FALSE), notifications are not suppressed.

Example

<$wfSetSuppressNotification(1)$>

See Also


WfStart

Sends the revision to the first step in the current workflow. Note that this variable begins with an uppercase W.

Type and Usage

Example

Sets the target step for a jump to restart the workflow:

<$wfSet("wfJumpTargetStep",WfStart)$>

wfUpdateMetaData()

Defines a metadata value for the current content item revision in a workflow.

The wfUpdateMetaData function can be used only for updating custom metadata fields. You cannot use this function to update standard, predefined fields

Type and Usage

Parameters

Takes two parameters:

Example

Defines "This is my comment." as the value of the Comments field:

<$wfUpdateMetaData("xComments", "This is my comment.")$>

xml()

Formats a string for use in XML.

This function replaces non-alphanumeric characters with the correct XML sequence that represents the character. For example, the ampersand "&" character is replaced with the "&amp;" sequence.

When using a double-quote character within a string, a backslash "\" must precede the double-quote to display it as a character. If the backslash is not used as an escape flag, the double-quote is interpreted as ending the string.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string formatted for use in a URL.

Example

Escapes the ampersand and returns the XML formatted string, "Me &amp; you."

<$xml("Me & you.")$>

Escapes the non-alphanumeric characters and returns the XML-formatted string, "Test the &quot;, &gt;, and &lt; characters."

<$xml("Test the \", >, and < characters.")$>