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.
Aborts the current page and displays an error message.
This function evaluates the StatusCode variable, and if a negative numeric value (-1
) is returned, substitutes the display of the current page with an error page.
The StatusMessage variable can be used as the error message string.
The only parameter is the error message string.
Returns the error message string on an error page.
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$>")$>
Specifies that a metadata field option list has blank value as the first option in the list.
Returns TRUE if the first value in the option is blank.
Returns FALSE if the first value in the option list is not blank.
Specifies that the first value in the option list is blank:
<$if ForceDocTypeChoice and isTrue(ForceDocTypeChoice)$> <$addEmptyOption = 1$> <$endif$>
Checks if the current user has the admin role for at least one security group.
Returns TRUE if the user is an administrator for at least one security group.
Returns FALSE if the user is not assigned the admin role.
Can be used to do an optional presentation for an administrator:
<$if (AdminAtLeastOneGroup)$> <a href="<$redirect$>"> <$endif$>
Specifies whether the current page was created immediately after a login.
Returns TRUE if the page was created immediately after a login.
Returns FALSE if the page was not created immediately after a login.
Displays an alternate URL if the page was not created immediately after a login:
<$if not AfterLogin$> <a href="<$redirect$>"> <$endif$>
Checks if the current user has checkin permission for the content item's security group.
Returns TRUE if the user has checkin permission.
Returns FALSE if the user does not have checkin permission.
Can be used to do an optional presentation for a user with checkin permission:
<$if (AllowCheckin)$> <a href="<$redirect$>"> <$endif$>
Checks whether current user has checkout permission for the content item's security group.
Returns TRUE if the user has checkout permission.
Returns FALSE if the user does not have checkout permission.
Can be used to do an optional presentation for a user with checkout permission:
<$if (AllowCheckout)$> <a href="<$redirect$>"> <$endif$>
Checks if the current user is allowed to approve or reject the current workflow item.
Returns TRUE if the user is a reviewer for the current workflow step.
Returns FALSE if the user is not a reviewer for the current workflow step.
Displays Approve and Reject buttons if the user is a reviewer:
<$if AllowReview$> <$include workflow_doc_action_buttons$> <$endif$>
Specifies the e-mail address of the author of a content item.
Returns a string or Boolean value depending on use.
Standard use: Returns the e-mail address of the content item's author as a string.
Used in a conditional statement:
Returns TRUE if the content item author has a defined e-mail address.
Returns FALSE if the content item author has no e-mail address.
Can be used to alert the content item author through e-mail when a revision is made.
<$AuthorAddress$>
Enables authors of content items to delete their own revisions without having the Delete privilege for the security group.
When set to TRUE
and Content Server is configured to use Folders (enabled by the FrameworkFolders
component), authors can delete their own revisions as long as they have the Read privilege, where normally they would need the Delete privilege for the security group.
When set to TRUE
and Content Server is configured to use Contribution Folders (enabled by the Folders_g
component), authors can delete their own revisions as long as they have the Read privilege, where normally they would need the Delete privilege for the security group.
Default is an empty string.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Content Security tab, Allow author to delete revision
Admin Server, Content Security option, Allow author to delete revision
IntradocDir
/config/config.cfg
As a configuration entry:
AuthorDelete=true
As Idoc Script:
<$if AuthorDelete$> <$AuthorDelete$> <$else$> false <$endif$>
Defines the prefix that will be added to all automatically numbered Content IDs.
Returns the automatic numbering prefix (returns value in configuration settings).
Returns a string.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Auto Name Prefix
Admin Server, General Configuration, Auto Number Prefix
IntradocDir
/config/config.cfg
As a configuration setting, defines the automatic numbering prefix:
AutoNumberPrefix=HR
As Idoc Script, returns the value of the configuration setting:
<$AutoNumberPrefix$>
"IsAutoNumber" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Defines the path to the default batch load text file.
Returns the file path as a string.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
DomainHome
/ucm/cs/bin/intradoc.cfg
As a Windows configuration entry:
BatchLoaderPath=c:/domain/BatchLoader/batchfile.txt
As a Solaris/UNIX configuration entry:
BatchLoaderPath=/u1/intradoc3/batLd/batchfile
As Idoc Script, returns the file path as a string:
<$BatchLoaderPath$>
Often used to terminate a loop.
The break instruction causes the innermost loop to be exited.
Control resumes with the first statement following the end of the loop.
Retrieves the version number of the client browser.
Returns the browser version number as a string.
Can be used to ensure that the user has a browser version compatible with Content Server.
<$BrowserVersionNumber$>
Specifies a comment in Idoc Script code.
Places a comment in the code:
<$c = "Sets the variables to empty strings."$>
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."
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. |
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)$>
Specifies the width of a metadata field, in percent.
Returns the width of the current metadata field in percent.
Used as script:
<$if isInfo$> <$captionFieldWidth="30%"$> <$captionEntryWidth="70%"$> <$elseif isEditMode$> <$captionFieldWidth="20%"$> <$captionEntryWidth="80%"$> <$endif$>
Specifies the width of a metadata field caption, in percent.
Returns the width of the current metadata field caption in percent.
Used as script:
<$if isInfo$> <$captionFieldWidth="30%"$> <$captionEntryWidth="70%"$> <$elseif isEditMode$> <$captionFieldWidth="20%"$> <$captionEntryWidth="80%"$> <$endif$>
Clears the data from a schema ResultSet.
This function can take zero, one, or two parameters.
If passed zero arguments, it clears the data binder. Returns no value.
If passed one argument, the argument is the name of the ResultSet to clear the values from the current row. Returns no value.
If passed two arguments, the first argument is the ResultSet name and the second argument is the key identifying the data object to clear. Returns 0
if the data does not exist or 1
if it does exist. The use is True()
or False()
to conditionally execute scripts based on the return value.
<$clearSchemaData()$>
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.
Returns TRUE if the page was accessed from the ODMA Client.
Returns FALSE if the page was not accessed from the ODMA Client.
Checks if the page was accessed from the ODMA Client:
<$ClientControlled$>
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:
dDocAccount
(optional)
dDocName
dDocType
dProcessingState
dRevLabel
dSecurityGroup
dWebExtension
The only parameter indicates if the URL is relative, set to TRUE
(1
) or FALSE
(0
).
Returns the URL of a given rendition.
Takes three parameters:
The first parameter is the URL of the content item.
The second parameter is the dRevLabel
value.
The third parameter is the dRendition1
value. Possible values of dRendition1
include:
T = Thumbnail rendition
X = XML rendition
Returns the complete URL of the rendition as a string.
Returns the URL of the rendition as a string.
<$computeRenditionUrl(url, dRevLabel, dRendition1)$>
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.
Returns the content length in bytes.
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-->
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.
None.
Returns the current date and time.
This variable is similar to dateCurrent, which is used more frequently.
Returns a string formatted according to the user locale.
Used as script:
<$CURRENT_DATE$>
Evaluates which row of a ResultSet you are in.
The first row in a ResultSet is row zero (0).
Returns the row number.
Used as script:
<$CURRENT_ROW$>
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.
The only optional parameter is an integer, which adjusts the date by the specified number of days relative to the current date.
Returns a date formatted according to the user locale.
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)$>
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.
Returns TRUE
if the Dynamic Converter is configured to convert the content item.
Returns FALSE
if the Dynamic Converter is not configured.
<$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$>
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.
The following table lists parameters for this function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be appended. |
|
The name of an indexed column in the dynamicdata table. |
|
The value to use to select a section of the original table. This value will be checked in a case-insensitive manner against the |
|
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 |
If the dynamicdata table is successfully loaded, it returns TRUE.
<@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') %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be appended. |
|
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 |
If the dynamicdata table is successfully loaded, it returns TRUE.
<@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') %]]
This function sorts an existing ResultSet using the rules defined in a particular dynamicdata table.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to use for its sorting rules. |
|
The name of the ResultSet into which the dynamicdata table should be appended. |
If the sorting is successfully performed, it returns TRUE.
<@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")$>
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.
This function has one parameter, dataTableName
, which is the name of the dynamicdata table to load.
If the dynamictable exists, it returns True.
<@dynamicdata MyDataTable@> foo,bar,baz <@end@> <$fieldList = ddGetFieldList("MyDataTable")$> <$trace(fieldList, "#console")$> [[% Outputs: foo,bar,baz %]]
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,
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the resource include to execute. |
dataTableName |
The name of the dynamicdata table to use for preserving local data and ResultSets. |
A string representing the output of the executed resource include.
<@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 %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be loaded. |
|
The name of an indexed column in the dynamicdata table. |
|
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. |
|
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 |
If the dynamicdata table is successfully loaded, it returns TRUE.
<@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') %]]
This function loads a dynamicdata table into a ResultSet.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be loaded. |
|
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 |
If the dynamicdata table is successfully loaded, it returns TRUE.
<@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') %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be merged. |
|
The name of an indexed column in the dynamicdata table. |
|
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. |
|
The type of merge to perform. Set this to |
|
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 |
If the dynamicdata table is successfully merged, it returns TRUE.
<@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') %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be merged. |
|
The type of merge to perform. Set this to |
|
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 |
If the dynamicdata table is successfully merged, it returns TRUE.
<@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) %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of the ResultSet into which the dynamicdata table should be merged. |
|
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. |
|
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 |
If the dynamicdata table is successfully merged, it returns TRUE
.
<@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') %]]
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.
This function has one parameter, dataTableName
, which is the name of the dynamicdata table to load.
If the dynamicdata table exists, it returns TRUE.
<@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') %]]
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.
This function has one parameter, dataTableName
, which is the name of the dynamicdata table to load.
If the dynamicdata table was successfully loaded, it returns TRUE.
<@dynamicdata MyDataTable@> fieldA, fieldB, fieldC foo, bar, baz <@end@> <$exec ddSetLocalByColumnsFromFirstRow("MyDataTable")$> <$tmpStr1 = #local.fieldA$> [[% (tmpStr1 == 'foo') %]] <$tmpStr2 = #local.fieldC$> [[% (tmpStr2 == 'baz') %]]
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the dynamicdata table to load. |
|
The name of an indexed column in the dynamicdata table. |
|
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. |
If the dynamicdata table is successfully loaded, it returns TRUE.
<@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') %]]
This function takes a dynamicdata table and iterates over it, clearing local data. The first column is used as the keys to clear.
This function has one parameter, dataTableName
, which is the name of the dynamicdata table to use.
If the dynamicdata table exists, it returns TRUE.
<@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$>
This function takes a dynamicdata table and uses the columns to clear values in local data.
This function has one parameter, dataTableName
, which is the name of the dynamicdata table to use.
If the dynamicdata table exists, it returns TRUE.
<@dynamicdata MyDataTable@> foo, bar, baz <@end@> <$bar = "asdf"$> <$exec ddSetLocalEmptyByColumns("MyDataTable")$> <$if bar$> [[% This will not execute as bar will be empty. %]] <$endif$>
Defines the default accounts for anonymous users.
This must be a comma-delimited list of accounts.
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.
Default is #none(RWDA)
.
Returns the list of accounts as a string.
IntradocDir
/config/config.cfg
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$>
Specifies the include to use to display the metadata field.
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$>
Defines a piece of Idoc Script that displays a standard option list field.
None.
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@>
Retrieves a comma-delimited, colon-delimited list of roles the current user belongs to.
Returns the user role list as a string.
Returns a list of roles formatted as follows:
:guest:,:PublicContributor:,:ClassifiedConsumer:
Loads all the includes in a specified content item for use in the display of the current page.
The content item specified must have the file extension idoc.
This function sets StatusCode as a side effect. Use the abortToErrorPage function if the specified file must successfully load for the page to correctly display.
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.
|
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.
|
Rendition |
|
Note:
When used in HCSP pages, the ampersand (&) character in the CGI-encoded parameter list must be changed to the & character.
None.
Loads the resource includes in the primary vault rendition of the latest revision of mydoc.
<$docLoadResourceIncludes("dDocName=mydoc&RevisionSelectionMethod=Latest")$>
Retrieves the file name of a file without the extension or directory path.
This function is typically used to extract the Content ID (dDocName) part of a static URL controlled by Content Server.
Takes one parameter:
The only parameter is a path and file name.
Returns the file name as a string.
Returns the value mydoc:
docRootFilename("/groups/public/documents/adacct/mydoc.pdf")
Evaluates whether the Type of the current content item matches the Type in the active ResultSet.
Returns TRUE if the content item Types match.
Returns FALSE if the content item Types do not match.
Returns value based on whether the content item type matches the type for the ResultSet.
<$DocTypeSelected$>
Retrieves the URL of the file in the weblayout/
directory. This variable is evaluated once per content item, not once per service call.
Returns the URL of the file as a string.
Used to build URL links to content items.
<$if HasUrl$> <a href="<$DocUrl$>"><$dDocName$></a> <$else$> <$dDocName$> <$endif$>
Evaluates whether a URL can be disclosed to the current user.
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).
Returns a Boolean value.
Returns TRUE if the URL can be disclosed.
Returns FALSE if the URL is restricted.
Determines if the user can view the URL of the mydoc.pdf
document.
<$docUrlAllowDisclosure("/domain/groups/documents/mydoc.pdf")$>
Enables the multiple file Download Applet.
When set to TRUE
, the Download Applet is enabled so that multiple files can be downloaded from a search results page.
When set to FALSE
, the Download Applet is disabled.
Default is FALSE
.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Enable download applet
Admin Server, General Configuration, Enable download applet
IntradocDir
/config/config.cfg
As a configuration setting, enables the Download Applet:
DownloadApplet=true
As script, evaluates the condition of the Download Applet:
<$DownloadApplet$>
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.
Returns the path and suggested name for the downloaded file as a string.
Returns the path and suggested name for the downloaded file:
<$DownloadSuggestedName$>
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.
Takes one parameter:
Key: The designation for the value to be returned.
<$myValue = dpGet("myKey")$>
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.
Takes two parameters:
The first parameter is the designation for the value to be returned.
The second parameter is the value to be returned.
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")$>
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.
This function can take two parameters:
The first parameter is the name of the ResultSet to push into the data.
Optional. The second parameter is an alternate name for the ResultSet.
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.
This function takes two parameters:
Key: The designation for the value to be returned.
Value: Value associated with the key.
<$dpSet("myKey", "1")$>
Retrieves the name of the workflow.
Returns the name of the workflow as a string.
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>
Retrieves the name of the current step in the workflow.
Returns the name of the current step as a string.
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>
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.
Returns TRUE if an Account value is required.
Returns FALSE if an Account value is not required.
Evaluates whether an account number is required and displays an error message.
<$if not EmptyAccountCheckinAllowed$> <$isRequired = 1, requiredMsg = "Please specify an account."$> <$endif$>
Enables highlighting of full-text search terms in PDF, text, and HTML files.
When set to TRUE, search term highlighting is enabled.
When set to FALSE, search term highlighting is disabled.
Default is FALSE after installation of Content Server.
Default is TRUE after installation of PDF Converter.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Enable search keyword highlighting
Admin Server, General Configuration, Enable search keyword highlighting
IntradocDir
/config/config.cfg
As a configuration setting:
EnableDocumentHighlight=false
As script, returns the value of the configuration setting:
<$EnableDocumentHighlight$>
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.
Takes two required and one optional parameter:
The first parameter is the string to encode.
The second parameter is the rule to apply when encoding HTML constructs. The following values are allowed:
none
: no conversion is done to HTML constructs.
unsafe
: only well-known unsafe script tags are encoded.
exceptsafe
: well-known safe script tags are not encoded.
lfexceptsafe
: recommended for use when extended comments are entered by users and line breaks in the original text must be preserved.
An optional parameter is also available that specifies if long strings without space characters are to be broken up and what maximum word size to apply. Specify either wordbreak
or nowordbreak
.
Returns the encoded string.
"HtmlDataInputFilterLevel" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Retrieves the number of times the current workflow step has been entered by the current revision.
This variable can be used to create conditional statements, but it should not be hard-coded or altered.
This variable is localized in the companion file and maintained in the key:
<step_name>@<workflow_name>.entryCount
Returns the entry count as an integer.
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$>
Evaluates a variable definition as if it were Idoc Script. Can be used to recursively evaluate a literal string.
The only parameter is a variable that defines a string to be evaluated as Idoc Script.
Returns the parameter string, with any Idoc Script in the variable definition resolved.
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$>
Determines whether users can check out content that was authored by another user.
When set to TRUE, only the author or a user with Admin permission to the security group can check out a content item.
When set to FALSE, users with Write permission to the security group can check out content that was authored by another user.
Default is FALSE.
System Properties, Content Security tab, Allow only original contributor to check out
Admin Server, Content Security, Allow only original contributor to check out
IntradocDir
/config/config.cfg
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$>
Executes an Idoc Script expression and suppresses the output (does not display the expression on the page).
In earlier versions of Idoc Script, the exec keyword was required to suppress the value of any variable from appearing in the output file. In the current version, the exec keyword is needed only to suppress an expression from appearing in the output.
For example, the first line below is equivalent to the last two lines:
<$varA="stringA", varB ="stringB"$> <$exec varA="stringA"$> <$exec varB="stringB"$>
The exec keyword is typically used to evaluate behind-the-scenes code, such as specifying an include to be used later in the page.
The only parameter is an Idoc Script expression.
Returns the value of the expression, but does not display the expression on the page.
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@>
Executes a Content Server service.
This function allows the specified service to be executed while the page is being constructed. Generally, services are executed using a tool such as IdcCommand or the CGI URL on the browser.
Used with dynamic server pages.
Services that can be called with the executeService
function must be scriptable, meaning that they do not require parameter input. Scriptable services have an access level of 32 or more.
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.
Returns a StatusCode value of 0
if the service was executed successfully.
Returns a StatusCode value of -1
if an error in the service execution occurred.
All output of the executed service is suppressed, but any ResultSets and loaded values are available.
Executes a service when given a service name:
<$executeService("servicename")$>
Retrieves the default roles for users who are defined by an external user base (NTLM, Active Directory, or LDAP).
Returns a comma-delimited list of accounts, with permissions for each account 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.
As script, returns the default account information as a string:
<$ExternalUserAccounts$>
Retrieves the default roles for users who are defined by an external user base (NTLM, Active Directory, or LDAP).
Returns the list of roles as a string.
As script, returns the default role information as a string:
<$ExternalUserRoles$>
Specifies the caption label for a metadata field.
Returns the caption of the metadata field as a string.
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")$>
Specifies the include to use to display the caption for the metadata field.
None.
Sets the caption display include to std_field_caption
:
<$fieldCaptionInclude = "std_field_caption"$>
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:
searchLabel
infoLabel
tableEntry
requiredField
Returns the name of the caption style.
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@>
"NotationForRequiredFields" and "StyleForRequiredFields" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Specifies the default value for a metadata field.
Returns the default value of the metadata field as a string.
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"$>
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
.
None.
Specifies the include to use to display the value for the metadata field.
Sets the value display include to std_checkbox_entry
:
<$fieldEntryInclude = "std_checkbox_entry"$>
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
.
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
.
Specifies whether a metadata field has an option list.
When set to TRUE, the field has an option list.
When set to FALSE, the field does not have an option list.
Default is FALSE.
Returns TRUE if the field has an option list.
Returns FALSE if the field does not have an option list.
Defines the dDocAccount metadata field as an option list if predefined accounts exist:
<$if HasPredefinedAccounts$>
<$fieldIsOptionList = 1, optionListName = "docAccounts",
fieldOptionListType = "combo"$>
<$endif$>
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
.
Specifies the internal name of a metadata field.
Predefined metadata fields begin with a lowercase d
(for example, dDocName
).
Custom metadata fields begin with a lowercase x
(for example, xComments
).
Returns the name of the metadata field as a string.
Defines the dDocTitle metadata field:
<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1, fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>
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) |
Returns the option list type as a string.
Defines the dDocAccount option list type as combo (Edit and Select List):
<$if HasPredefinedAccounts$>
<$fieldIsOptionList = 1, optionListName = "docAccounts",
fieldOptionListType = "combo"$>
<$endif$>
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 |
Returns the metadata field type as a string.
Defines the dDocTitle metadata field as a BigText
(Long Text
) field:
<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1,
fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>
Specifies the value for a metadata field.
Returns the value of the current metadata field.
Generates the standard field value:
<@dynamichtml std_value_label@> <span class="<$fieldValueStyle$>"><$fieldValue$></span><!--""--> <@end@>
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:
tableEntry
xxsmall
strongHighlight
Returns the name of the value style.
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@>
Specifies the width of a metadata field, in characters.
Returns the width of the current metadata field.
Generates the Extension field with a width of 10 characters:
<$fieldName = "dExtension", fieldCaption = lc("wwNativeExtension"), fieldWidth = 10$>
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.
Returns the URL as a string.
Returns the relative URL of the current dynamic server page:
<$fileUrl$>
Returns the first revision label for the current revision label sequence.
Returns the first revision label as a string.
Returns the first revision label (default is 1):
<$FIRSTREV$>
Defines the Dynamic Converter rules that will apply forced conversions upon file checkin.
This is a comma-delimited list.
If a content item matches any of the specified conversion rules upon checkin, the file will be converted according to that rule. Each file can be converted into multiple renditions.
There is no default.
Note:
The forced conversion process does not apply the same Dynamic Converter template twice. For example, if you set ForcedConversionRules=RuleA,RuleB
, but RuleA and RuleB specify the same template with a different layout, the conversion according to RuleB will not occur. (Best practice in this case would be to merge the layouts and use Idoc Script to dynamically select the appropriate layout elements.)
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
Used as a configuration entry:
ForcedConversionRules=Rule1,Rule2,Rule3
"DisableForcedConversions" and "rule:IsFragmentOnly" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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."
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. |
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")$>
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).
The only parameter is a string that specifies a date/time.
Returns the date/time in the format used by dateCurrent (for example, 6/15/01 1:55 PM).
Returns null if the parameter cannot be evaluated.
If a time is not provided, returns a default time of 12:00 AM.
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
Formats the date and time in preparation for an SQL query. Long-formatted dates cannot be evaluated (for example, May 22, 2000).
The only parameter is a string or variable that specifies a date and time.
Returns an ODBC-formatted date and time:
[ts 'yyyy-mm-dd hh:mm:ss']
Returns null if the parameter cannot be evaluated.
If a time is not provided, returns a default time of 00:00:00.
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")$>
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.
The only parameter is a string that specifies a date/time.
Returns the date/time in the format used.
Returns null if the parameter cannot be evaluated.
<$formatDateDisplay$>
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).
The only parameter is a string that specifies a date/time.
Returns the date only in the format used by dateCurrent (for example, 7/12/00).
Returns null if the parameter cannot be evaluated.
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$>
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.
The only parameter is a string that specifies a date.
Returns the date in the format used.
Returns null if the parameter cannot be evaluated.
<$formatDateOnlyDisplay$>
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.
The only parameter is a string that specifies a date/time.
Returns a long-formatted date:
month d, yyyy
Returns null if the parameter cannot be evaluated.
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")$>
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.
Takes two parameters:
The first parameter is a date string used by the Content Server instance, or a date object created with the parseDate
or dateCurrent
functions.
The second parameter is the date/time pattern, such as MM/dd/yyyy
.
The capital letter Z
denotes the use of a UTC time zone for the entry. The lowercase zzzz
denotes the time offset (HHMM
) from the UTC time, preceded by a plus (+) or minus (-) sign to indicate the offset.
Returns the date/time in the format specified by the pattern parameter.
Returns null if the parameter cannot be evaluated.
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")$>
Reformats a date/time to the default time format and strips out the date.
The only parameter is a string or variable that specifies a date/time.
Returns a time only in the format used by dateCurrent (for example, 1:15 PM).
Returns null if the parameter cannot be evaluated.
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")$>
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.
The only parameter is a string that specifies the time.
Returns the time in the format used.
Returns null if the parameter cannot be evaluated.
<$formatTimeOnlyDisplay$>
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.
Returns the revision level as a string in the format CGI/revision
.
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-->
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.
The only parameter is the field name for which the ID will be generated.
Returns the ID for an HTML page.
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.
Takes one parameter, the name of the cookie.
<$myCounter=getCookie("myCounter")$> <$if not myCounter$> <$myCounter=1$> <$endif$> Num times loaded: <$myCounter$> <$setCookie("myCounter", myCounter+1, dateCurrent(1))$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Content Security tab, Allow get copy for user with read privilege
Admin Server, Content Security, Allow get copy for user with read privilege
IntradocDir
/config/config.cfg
As a configuration setting:
GetCopyAccess=true
As Idoc Script, returns the value of the configuration setting:
<$GetCopyAccess$>
Retrieves the output of the debug trace.
Returns the output of the accumulated debug trace for the page being constructed.
Returns an empty string if IsPageDebug
has not been set.
Retrieves the output of the debug trace and outputs the information to a page:
<$getDebugTrace()$>
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.
Returns the output of the accumulated error trace for the page being constructed.
The function returns an empty string if IsPageDebug
has not been set.
Retrieves the output of the error trace and outputs the information to a page:
<$getErrorTrace()$>
This function returns a configuration flag for a specific field. If the field does not exist, the default is returned instead.
Takes three parameters:
The name of a metadata field.
The flag to return for the field when it is found.
A default value to return if the field does not exist.
Returns the specified configuration flag.
<$caption = getFieldConfigValue("dDocTitle", "fieldCaption", lc("wwTitle"))$>
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.
Takes three parameters:
The first parameter is the name of the field to be used for the option list.
The second parameter is the name of the schema view used for the current field.
The third parameter is the value assigned to the field.
Returns the display value.
<$customerName = getFieldViewDisplayValue("xCustomer", "Customer_View", "1234")$>
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.
Takes three parameters:
Field. The name of a metadata field. This field must have an associated view.
Value. A lookup key for value.
Column name. A column in the view's table.
Returns the value in the column specified using the field value as a lookup.
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")
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.
The amount of free JVM memory in megabytes.
<$freeMem = getFreeMemory()$>
This function returns a relative URL to a help page based on the name of the page.
The name of the page used.
<input type=Button value="<$lc("wwQuickHelp")$>" onClick="QuickHelp('<$getHelpPage("QH_AdvancedSearch")$>', 'Search')">
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.
The only parameter is the option list to be sized.
Returns the size of the specified option list.
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.
Takes four parameters:
The name of the schema view used for the current field.
The name of the schema relation between this field and the parent field.
The name of the parent field.
The internal value for the parent field. This may be different than the value displayed on the page. This is often a unique number stored internally.
<$parentValue=getParentValue("xState", "Country_State", "xCountry", "123")$>
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:
The function looks for the fieldname:requiredMsg
value.
If the value exists, it is localized.
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
).
Takes two parameters:
Fieldname
: Field associated with the error message.
Message
: Default message to be used.
Gets the web version of a text file and returns its contents to a string.
This can be used only with files that have a format containing text, such as text/html
, text/plain
, or text/xml
. Specifically, the dFormat
field of the content item must start with text
. For example, if an HCSP file is checked in, Formats: text/hcsp
is displayed in the Content Info
display; therefore, the content is displayed by the getTextFile()
function.
There must be enough information to determine the content item's web URL. The dID
value is the only required metadata field.
The following information must be present:
dDocName
, dWebExtension
, dSecurityGroup
, dRevLabel
, and dDocType
.
If Accounts are enabled, dDocAccount
must also be specified.
This information is available automatically after a GET_SEARCH_RESULTS
call or after a DOC_INFO
call.
This function should be wrapped with a cacheInclude
call for greater performance. That can, however, create a security issue if all docs go to the same cache.
This function does not take parameters but uses variables on the page to determine the document's URL.
<$loop SearchResults$> <$fullDocument=getTextFile()$> <h2><$dDocTitle$></h2> <div><$fullDocument$></div> <$endloop$>
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.
The total JVM memory in megabytes.
<$totalMem = getTotalMemory()$>
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.
The only parameter is a user-related variable.
Returns the value of the metadata field for the current user.
Evaluates to TRUE
if the user value was retrieved.
Evaluates to FALSE
if an error in retrieval occurred.
Returns a StatusCode value of -1
if the value is unspecified or unknown.
Returns the user type of the currently logged on user:
<$getUserValue('dUserType')$>
This function has multiple uses:
Retrieves the value of a particular metadata field from local, active, or environment data.
Retrieves the value of a particular column from a specific ResultSet.
Retrieves information about ResultSet rows.
Takes two parameters:
The first parameter is either the type of data or the name of a ResultSet.
The second parameter is the name of a metadata field, the column name, or a ResultSet row parameter.
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:
|
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. |
For output values, see the preceding subsection, Variations.
Returns an empty string if a value is not found.
Gets the Content ID from the ResultSet named DOC_INFO:
<$name = getValue("DOC_INFO","dDocName")$>
or
<$name = <$DOC_INFO.dDocName$>
Checks to see if the passed parameter dDocType (which is in the local data) equals the value in the active ResultSet:
<$loop DocTypes$> <$if strEquals(#active.dDocType, getValue("#local","dDocType"))$> <!--do special HTML for selected document type--> <$endif$> <!-- additional statement--> <$endloop$>
Retrieves the value of a user attribute for a specific user. This function can be useful for defining extended workflow functionality.
Takes two parameters:
The first parameter is the user name.
The second parameter is the name of a column in the Users
database table that specifies a user attribute (such as dFullName
, dUserType
, or dEmail
).
Returns the value of the user attribute for the specified user.
Returns an empty string if the value is not found.
Retrieves the full name for mjones.
<$getValueForSpecifiedUser('mjones', 'dFullName')$>
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
.
This function takes three parameters:
The name of the schema view used for the current field.
The value stored in the database for the ID.
The column name associated with the view.
Returns the display value.
<$custName = getViewValue("Customer_View", "1234", "CustomerName")$> <$custRegion = getViewValue("Customer_View", "1234", "CustomerRegion")$>
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.
Takes three parameters:
The name of the schema view used.
The relation for the schema and the view.
The value for the schema parent.
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")$>
Checks if the current user has rights to an administrative application.
The only parameter is one of the following administrative applications:
UserAdmin
WebLayout
RepoMan
Workflow
ConfigMan
Archiver
Returns TRUE if the user has rights to the specified application.
Returns FALSE if the user does not have rights to the specified application.
Returns a StatusCode value of -1
if the value is unspecified or unknown.
Evaluates whether the current user has rights to the specified application.
<$hasAppRights('RepoMan')$>
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
.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
As a configuration setting:
HasExternalUsers=true
As Idoc Script, returns the value of the configuration setting:
<$HasExternalUsers$>
"NtlmSecurityEnabled" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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.
Returns TRUE if a local copy is detected.
Returns FALSE if a local copy is not detected.
Checks for a local copy of the content item:
<$HasLocalCopy$>
Specifies that the metadata field has an option list.
Returns TRUE if the field has an option list.
Returns FALSE if the field does not have an option list.
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$>
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).
Returns TRUE if an original file exists.
Returns FALSE if no original file exists.
Checks for an original file:
<$if HasOriginal and not isNew$>
Checks if the current user has permission to any predefined accounts. Predefined accounts are those that are created in the User Admin utility.
Returns TRUE if the user is assigned to any predefined accounts.
Returns FALSE if the user is not assigned to any predefined accounts.
Displays the Accounts option list if the user is assigned to any predefined accounts:
<$if HasPredefinedAccounts$> <$fieldIsOptionList = 1, optionListName = "docAccounts", fieldOptionListType = "combo"$> <$endif$>
Checks if a file exists in the weblayout
directory for the current content item.
Returns TRUE
if a weblayout
file exists.
Returns FALSE
if no weblayout
file exists.
Checks for a weblayout
file:
<$if HasUrl$> <$include doc_url_field$> <$endif$>
Checks if the checkin is through the Content Server ODMA client or Upload applet.
Returns TRUE
if the ODMA client or Upload
applet is being used for checkin.
Returns FALSE
if the ODMA client and Upload
applet are not being used for checkin.
Checks for check in method:
<$HeavyClient$>
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.
In the page's URL:
&htmlRefreshTimeout=90
"DefaultHtmlRefreshTimeoutInSeconds" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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.
In the page's URL:
&htmlRefreshUrl=http://www.home.com
"DefaultHtmlRefreshTimeoutInSeconds" in Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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.
Returns the path as a string.
Returned for a Content Server domain:
HttpAbsoluteCgiPath=http://localhost/domain/idcplg/
"HttpAbsoluteCgiRoot" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Retrieves the Admin Server CGI path as a relative URL.
Returns the Admin Server CGI path as a string.
Returned for a Content Server instance:
HttpAdminCgiPath=/idcplg/idc_cgi_isapi-instance.dll/cs-admin/pxs
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).
HttpBrowserFullCgiPath=http://localhost/idc1/idcplg
"HttpIgnoreWebServerInternalPortNumber" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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. |
Returns the path as a string.
Returned for a Content Server instance:
HttpCgiPath=/domain/idcplg
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.
Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.
Returned for a Content Server instance:
HttpCommonRoot=/domain/common/
Retrieves the CGI path of a Content Server instance as a relative URL.
Returns the Content Server CGI path as a string.
Returned for a Content Server:
HttpEnterpriseCgiPath=/idcplg/idc_cgi_isapi-instance.dll
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.
Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.
Returned for a Content Server instance:
HttpHelpRoot=/domain/help/
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.
Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.
Returned for a Content Server:
HttpImagesRoot=/domain/images/
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.
Retrieves the relative URL of the Admin Server for a Content Server instance.
Defaults to /cs-admin/
during installation.
Returns the relative URL as a string.
Returned for a Content Server:
HttpRelativeAdminRoot=/cs-admin/
Defines the web server root directory as a relative URL.
A relative root such as /domain/ is used rather than a full root such as http://www.mycomputer.com/domain/.
Returns the relative web root directory as a string.
There is no default value.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Internet tab, Http Relative Web Root
Content Server: IntradocDir
/config/config.cfg
As a configuration setting, defines the relative web root:
HttpRelativeWebRoot=/domain/
As Idoc Script, returns the relative web root as a string:
<$HttpRelativeWebRoot$>
"HttpAbsoluteWebRoot" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Internet tab, HTTP Server Address
Content Server: IntradocDir
/config/config.cfg
As a configuration setting, defines the web server address:
HttpServerAddress=mycomputer
As Idoc Script, returns the web server address as a string:
<$HttpServerAddress$>
"IdcCommandServerHost " in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"IntradocServerHostName" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Similar to the HttpHelpRoot
variable except this variable returns the path to the help files for the default system language.
Returns the path to the help files.
HttpSystemHelpRoot=/domain/help/
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. |
Returns the relative URL as a string. If the URL is external, the complete URL is returned rather than the relative path.
Returned for a Content Server:
HttpWebRoot=/domain/
Retrieves a list of content types that the browser can accept.
Returns a list of content types as a comma-delimited string.
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-->
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.
Returns a list of compression encodings as a comma-delimited string.
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-->
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.
Returns a list of languages as a comma-delimited string.
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-->
Retrieves the name/value pair of the cookie in the HTTP request header.
Returns a string in the format name1=string1; name2=string2
.
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-->
Retrieves the name of the web server.
Returns the web server name as a string.
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-->
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.
Returns the user name as a string.
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-->
Retrieves the complete URL of the referenced directory on the local server.
Returns the complete URL as a string.
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-->
Retrieves the client browser type, version number, library, and platform for which the browser is configured.
Returns a string in the format software/version (library) (platform)
.
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-->
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.
The names in the IdcAuthExtraRequestParams
list must match the header names without regard for case (case insensitive match).
When used as Idoc Script variables, the names in the IdcAuthExtraRequestParams
must match exactly (case sensitive match).
There is no default value.
For information about IdcCommand, see Chapter 27, "Using the IdcCommand Utility to Access Content Server."
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
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
This function tests to find out if a dynamichtml resource exists.
This function has one parameter: includeName
is the name of the dynamichtml resource.
If the resource exists, then it returns TRUE.
<$if idocTestForInclude("std_page_begin")$> <$include std_page_begin$><$endif$>
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."
The only parameter is a variable that defines the name of an include.
Displays the code that is defined in the specified include resource.
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.
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.
Takes two parameters:
The first parameter is the Content ID of a document.
The second parameter is the name of a conversion rule.
Retrieves the specified document converted according to the template and layout defined for the specified conversion rule.
Retrieves the converted rendition of the content item with a Content ID of PhoneList
, converted according to conversion rule RuleA
:
<$incDynamicConversionByRule("PhoneList","RuleA")$>
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.
The only parameter is the name of a global include file without the .inc
file extension.
Displays the code that is defined in the specified global include file.
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")$>
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."
The only parameter is the name of the include.
Displays the code that is defined in the specified include resource.
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$>
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.
The only parameter is the name of a Content Server template file without the .htm
file extension.
Displays the code that is defined in the specified template.
Retrieves the new_look
template file.
<$incTemplate("new_look")$>
This function modifies the logic of the search indexer. This function is designed to allow calculation of cumulative statistics about the index collection.
Takes two parameters:
The first parameter is the name of the flag used.
The second parameter is the value attributed to the flag.
Any name and value can be used. These values become available the next time the resource include is executed for the index collection.
Defines a description for the instance.
The instance description is used in the Content Server interface.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Server tab, Instance Description
IntradocDir
/config/config.cfg
As a configuration entry:
InstanceDescription=Master_on_Server1
As Idoc Script, returns the server instance description as a string:
<$InstanceDescription$>
"IDC_Name" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"InstanceMenuLabel" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Checks if a section is being traced in the core.
Returns active trace results.
<$isActiveTrace()$>
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.
Returns TRUE if the page is a checkin page.
Returns FALSE if the page is not a checkin page.
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$>
Checks if a checkin application pre-authorized the current checkin by getting a security token.
Returns TRUE if the checkin is pre-authorized.
Returns FALSE if the checkin is not pre-authorized.
Checks for checkin pre-authorization:
<$IsCheckinPreAuthed$>
Checks if the defined component in enabled.
The only parameter is the component name.
Returns TRUE if the defined component is enabled.
Returns FALSE if not enabled.
<$isComponentEnabled("Folders")$>
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).
Returns TRUE if the user is a contributor.
Returns FALSE if the user is not a contributor.
Used to evaluate whether a user is a contributor:
<$if IsContributor$>
Evaluates whether a subscription to the content item is criteria-based rather than based on the Content ID (dDocName
).
Returns TRUE if the subscription is criteria-based.
Returns FALSE if the subscription is to a particular content item.
Evaluates whether subscription is criteria based:
<$IsCriteriaSubscription$>
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.
Returns TRUE if the navigation loop is at the same page as the current page.
Returns FALSE if the navigation loop is not at the same page as the current page.
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$>
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.
Returns TRUE if the page is a document page.
Returns FALSE if the page is not a document page.
Set at the top of a page:
isDocPage=1
Used as script:
<$if isDocPage$> <!--statement--> <$endif$>
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.
Returns TRUE if the page is being presented dynamically to the user.
Returns FALSE if the page is static or cannot be displayed.
Evaluates whether the page is presented dynamically:
<$if IsDynamic$> <a href="<$redirect$>"> <$endif$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Enable Dynamic Converter
Admin Server, General Configuration, Enable Dynamic Converter
IntradocDir
/config/config.cfg
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"> </td> <td width="245"><span class=largeTableEntry> <a href="<$HttpCgiPath$>?IdcService=GET_TEMPLATE_CONVERSIONS"> <$lc("wwTemplateConversions")$></span></a> </td> </tr> <$endif$>
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.
Returns TRUE if metadata fields on the current page can be edited.
Returns FALSE if metadata fields on the current page cannot be edited.
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$>
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.
Returns TRUE if the current revision is in an Editor step in a workflow.
Returns FALSE if the current revision is not in an Editor step in a workflow.
Provides workflow details:
<$if IsEditRev$> addCheckinValue("IdcService", "WORKFLOW_CHECKIN"); if (form.isFinished.checked) addCheckinValue("isFinished", form.isFinished.value); <$else$> addCheckinValue("IdcService", "CHECKIN_SEL"); <$endif$>
Completely excludes the metadata field from the page.
Returns TRUE if the metadata field is excluded from the page.
Returns FALSE if the metadata field is not excluded from the page.
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$>
Checks if the user is accessing the Content Server instance from an external system, such as a LDAP system.
Returns TRUE
if the user is accessing the Content Server instance from an external system.
Returns FALSE
if the user is accessing the Content Server instance directly.
Checks if user is at an external location:
<$IsExternalUser$>
Checks if the Oracle WebCenter Content: Inbound Refinery system has failed to convert the content item.
Returns TRUE if the conversion process failed.
Returns FALSE if no conversion failure was detected.
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$>
Checks if the Indexer has failed to index the content item.
Returns TRUE if the Indexer was unable to index the content item.
Returns FALSE if the content item was indexed successfully.
Displays text if the content item was not indexed:
<$if IsFailedIndex $> <p><font face="arial" size="2"> Unable to index content item.</p> <$endif$>
Checks if a string or expression evaluates to FALSE.
The only parameter is the string or expression to be evaluated.
If the parameter is a string:
Returns TRUE if the string begins with F, f, N, n, or is 0.
Returns FALSE if the string begins with any other character.
If the parameter is not a string:
Returns TRUE if the value is 0.
Returns FALSE if the value is not 0.
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"))$>
Specifies that the metadata field is excluded.
Returns TRUE if the field is excluded.
Returns FALSE if the field is not excluded.
Determines if the metadata field is excluded:
<$if isCustomExcluded or (isCustomRelocated and not isRelocated) or isExcluded or (isFieldHidden and not isFormSubmit)$> <$isFieldExcluded = 1$> <$endif$>
Specifies that the metadata field is hidden.
Returns TRUE if the field is hidden.
Returns FALSE if the field is not hidden.
Determines if the metadata field is hidden:
<$if isHidden or isCustomHidden$> <$isFieldHidden = 1$> <$else$> <$isFieldHidden = ""$> <$endif$>
Specifies that the metadata field is an information only field.
Returns TRUE if the field is an information only field.
Returns FALSE if the field is not an information only field.
Determines if the metadata field is information only:
<$if isInfo or isCustomInfo or isFieldHidden or isInfoOnly$> <$isFieldInfoOnly = 1$> <$else$> <$isFieldInfoOnly = ""$> <$endif$>
Specifies that the metadata field is a memo field.
Returns TRUE if the field is a memo field.
Returns FALSE if the field is not a memo field.
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@>
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.
Returns TRUE if the loop is at the same revision as the current revision.
Returns FALSE if the loop is not at the same revision as the current revision.
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@>
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.
Returns TRUE if the page is a submittable HTML form.
Returns FALSE if the page is not a submittable HTML form.
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@>
Checks if the Indexer has full-text indexed the content item.
Returns TRUE
if the content item has been full-text indexed.
Returns FALSE
if the content item has not been full-text indexed.
Provides a specified URL if the content item is full-text indexed:
<$if IsFullTextIndexed$> <a href="<$redirect$>"> <$endif$>
Hides the metadata field from the user but includes the field as hidden data on the page.
Returns TRUE if the metadata field is hidden on the page.
Returns FALSE if the metadata field is not hidden the page.
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$>
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.
Returns TRUE if the page is an information-only page.
Returns FALSE if the page is not an information-only page.
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$>
Displays the metadata field as information only, not as an input field.
Returns TRUE if the metadata field is displayed as information only.
Returns FALSE if the metadata field can be edited.
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$>
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.
When set to TRUE
, returns the local data in the DataBinder, in HDA format.
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
Used to determine if a particular layout is installed and enabled.
Takes one parameter, the ID of the layout.
In the std_resources.htm file:
<$if isLayoutEnabled("Trays")$><$do Publish=1$><$endif$>
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.
There are no parameters, just the setting of 1
or 0
(true or false) based on the evaluated condition or conditions.
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$>
Checks if the content item is in the local search collection. Searches for the content item's Content ID in the local search collection.
Returns TRUE if the content item is in the local collection.
Returns FALSE if the content item is not found in the local collection.
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=""$>
Checks if the current user is logged in.
Returns TRUE if the user has logged in.
Returns FALSE if the user has not logged in.
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@>
Checks if the client browser is running on a Macintosh operating system.
Returns TRUE if the client browser is running on a Mac.
Returns FALSE if the client browser is not running on a Mac.
Redirects to a different URL if the browser is running on a Mac:
<$if IsMac$> <a href="<$redirect$>"> <$endif$>
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.
Returns TRUE if the number of results is greater than the number of rows permitted.
Returns FALSE if the number of results is less than the number of rows permitted.
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>
Specifies that a metadata field option list allows multiple values to be selected.
Returns TRUE if the field is a multiselect option list.
Returns FALSE if the field is not a multiselect option list.
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$>
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).
Returns TRUE if the number of search results is greater than the number of rows permitted per page.
Returns FALSE if the number of search results is less than the number of rows permitted per page.
Evaluates number of rows and determines if multiple pages are needed:
<$IsMultiPage$>
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.
Returns TRUE if the content item is new.
Returns FALSE if the content item is a revision to an existing content item.
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$>
Checks if the revision is the last revision to be checked in. This is not necessarily the last released revision.
Returns TRUE if the content item is other than the latest revision to be checked in.
Returns FALSE if the content item is the latest revision to be checked in.
Checks for the latest revision:
<$IsNotLatestRev$>
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.
Returns TRUE if revisions do not match.
Returns FALSE if revisions match.
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$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Allow override format on check in
Admin Server, General Configuration, Allow override format on check in
IntradocDir
/config/config.cfg
As a configuration setting:
IsOverrideFormat=true
As Idoc Script, returns the value of the override format function:
<$IsOverrideFormat$>
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.
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.
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$>
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.
Returns TRUE
if the Content Server instance is set to prompt for login.
Returns FALSE
if login is being handled programmatically.
Evaluates if server is set to prompt for login:
<$IsPromptingForLogin$>
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.
Returns TRUE if the page is a search page.
Returns FALSE if the page is not a search page.
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$>
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.
Returns TRUE if the metadata field is included at that location on the page.
Returns FALSE if the metadata field is excluded from that location on the page.
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$>
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.
Returns TRUE
if there is a request error condition present in the Content Server instance (StatusCode = -1
).
Returns FALSE
if there is no request error condition present on the Content Server instance (StatusCode
is other than a negative numeric value).
Evaluates the request error condition:
<$IsRequestError$>
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.
Returns TRUE if the metadata field is required.
Returns FALSE if the metadata field is optional.
Defines the dDocTitle metadata field as a required field:
<$fieldName = "dDocTitle", fieldCaption = lc("wwTitle"), isRequired = 1,
fieldType = "BigText", requiredMsg = lc("wwSpecifyTitle")$>
Checks if a query has been saved to the current user's portal navigation bar.
Returns TRUE if the current query has been saved.
Returns FALSE if the current query has not been saved or no query is found.
Evaluates query status:
<$IsSavedQuery$>
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.
When set to TRUE
, returns the underlying SOAP code, in XML format.
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
Specifies that a metadata field option list does not allow multiple values to be selected.
Returns TRUE if the field is not a multiselect option list.
Returns FALSE if the field is a multiselect option list.
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$>
Checks if the current user has subadministrator rights to at least one administrative application.
Returns TRUE if the user has subadministrator rights.
Returns FALSE if the user does not have subadministrator rights.
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@>
Checks if the client browser is running on a Sun system.
Returns TRUE if the client browser is running on Sun.
Returns FALSE if the client browser is not running on Sun.
Redirects to a different URL if the browser is running on Sun:
<$if IsSun$> <a href="<$redirect$>"> <$endif$>
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.
Returns TRUE
if the user has the sysmanager
role.
Returns FALSE
if the user does not have the role
Checks if a string or expression evaluates to TRUE.
The only parameter is the string or expression to be evaluated.
If the parameter is a string:
Returns TRUE if the string begins with T, t, Y, y, or is 1.
Returns FALSE if the string begins with any other character.
If the parameter is not a string:
Returns TRUE if the value is not 0.
Returns FALSE if the value is 0.
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"))$>
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.
Returns TRUE if the page is a content information update page.
Returns FALSE if the page is not a content information update page.
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$>
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.
Returns TRUE if the include is being used inside JavaScript.
Returns FALSE if the include is not being used inside JavaScript.
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$>
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.
Returns TRUE if the upload socket is defined for use with the Upload applet.
Returns FALSE if the upload socket should not be used.
N/A
Checks if an e-mail address is defined for the current user.
Returns TRUE if an e-mail address is defined for the user.
Returns FALSE if an e-mail address is not defined for the user.
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@>
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.
The only parameter is the value TRUE or FALSE.
Evaluates to TRUE if the user override is enabled.
Enables users to check in content items with another user specified as the Author:
<$isUserOverrideSet(true)$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Used as a configuration entry:
isValidateFile=true
Checks if a section is being traced in the core. Verbose trace generates a full report.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Returns TRUE if tracing is set to Verbose.
Returns FALSE if tracing is set to any other debug level.
<$isVerboseTrace()$>
Checks if the client browser is running on a Windows operating system.
Returns TRUE if the client browser is running on Windows.
Returns FALSE if the client browser is not running on Windows.
Redirects to a different URL if the browser is running on Windows:
<$if IsWindows$> <a href="<$redirect$>"> <$endif$>
Checks if the content item on a checkin page is in a workflow.
Returns TRUE if the content item is in a workflow.
Returns FALSE if the content item is not in the workflow.
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.
Returns the XML data contained in the form.
This function is used to specify a field for full text searching.
The name of the field to be checked.
Formats a string for use in a "..." JavaScript literal string declaration.
This function performs string manipulation such as changing double quotes to single quotes.
The only parameter is the string.
Returns a string formatted for use in a JavaScript string declaration.
Formats the string variablestring for use in a JavaScript string declaration:
<$js("variablestring")$>
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).
The only parameter is the string to be encoded.
Returns an encoded string.
<$jsFilename(fileName)$>
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.
When set to TRUE
, returns the local data in the DataBinder in a JavaScript object, in compliance with the JSON (Javascript over network) specification.
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
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
Returns the timestamp in the format defined by dateCurrent.
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$>
Retrieves the value of a localization string based on the current user's locale.
Takes one required parameter and any number of optional parameters:
The first parameter is the localization key (such as apLabelHelp
or wwMyString
).
The optional parameters are expressions that are resolved according to arguments inside curly braces in the localized string (for example, {1}
).
Returns the value of the localization string for the current user's locale.
Returns the string ID (such as wwMyString) if the value is not found.
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@>
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.
Takes one required parameter:
The string to be wrapped.
optional parameters are expressions that are resolved according to arguments inside curly braces in the localized string (for example, {1}
).
Defines the default layout to use (for example, Top Menus or Trays).
The default installation value is Trays
.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
LmDefaultLayout=Top Menus
Defines the default skin to use (for example, Oracle, Oracle2).
IntradocDir
/config/config.cfg
LmDefaultSkin=Oracle
Retrieves the layout selected by the user (for example, Top Menus or Trays).
None.
<$lmGetLayout()$>
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.
Takes one parameter, the name of the search collection to be loaded.
None.
Loads search collection information:
<$loadCollectionInfo(collection_name)$>
Loads the DocMetaDefinition
database table into the active data as a ResultSet.
After the DocMetaDefinition
database table is loaded, it can be looped on.
None.
None.
Loads the DocMetaDefinition
table into the active data as a ResultSet.
<$loadDocMetaDefinition()$>
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.
None.
None.
<$loadDocumentProfile()$>
Loads the data from a schema ResultSet into the local data of the current data binder.
This function can take zero, one, or two parameters.
If passed zero arguments, it fills the data binder with the data in the active ResultSet's row. Returns no value.
If passed one argument, the argument is the name of the ResultSet to get the values from the current row. Returns no value.
If passed two arguments, the first argument is the ResultSet name and the second argument is the key identifying the data object to load. Returns 0 if the data does not exist or 1 if it does exist. The use is True() or False() to conditionally execute scripts based on the return value.
<$loadSchemaData()$>
Loads mappings between the full set of operator names and the search syntax. Used on the Search page.
None.
Returns expressions associated with operator names (search operator map).
<$loadSearchOperatorTables()$>
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.
None.
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.
Takes one parameter, the link data used to construct the tree view.
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Major Revision Label Sequence
Admin Server, General Configuration, Major Revision Label Sequence
IntradocDir
/config/config.cfg
As a configuration setting:
MajorRevSeq=A-Z
As script, returns the value of the configuration setting:
<$MajorRevSeq$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Repository Manager, Indexer tab, Configure, Content Items Per Indexer Batch
IntradocDir
/config/config.cfg
As a configuration setting, defines the batch size:
MaxCollectionSize=25
As script, returns the value from configuration files:
<$MaxCollectionSize$>
Sets the maximum number of characters allowed in a metadata field.
Returns the maximum length of the field.
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")$>
Defines the minor sequence for revision numbers.
Returns the minor revision label sequence (returns the value of the configuration setting).
Returns a string.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Minor Revision Label Sequence
Admin Server, General Configuration, Minor Revision Label Sequence
IntradocDir
/config/config.cfg
As a configuration setting:
MinorRevSeq=a-c
As script, returns the value of the configuration setting:
<$MinorRevSeq$>
Checks whether the client browser is Microsoft Internet Explorer.
Returns TRUE if the client browser is Internet Explorer.
Returns FALSE if the client browser is not Internet Explorer.
Redirects to a different URL if the browser is anything other than Internet Explorer:
<$if not MSIE$> <a href="<$redirect$>"> <$endif$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Options tab, Enable upload applet
Admin Server, General Configuration, Enable upload applet
IntradocDir
/config/config.cfg
As a configuration setting, enables the Upload Applet:
MultiUpload=true
As script, evaluates the condition of the Upload Applet:
<$MultiUpload$>
Checks whether matches were found from a search query.
Generally used to display a message on the search results page.
Returns TRUE if no matches were found.
Returns FALSE if any matches were found.
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$>
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.
Returns TRUE
if the MultiCheckin
component will not prefill metadata fields.
Returns FALSE
if the MultiCheckin
component will prefill metadata fields.
Set near the top of the page:
noMCPrefill=1
Used as script:
<$noMCPrefill$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
There is one parameter, the query to be used. The query can be one of the following. See the "Example" section for sample queries.
An Idoc Script query, built from Idoc Script.
A URL encoded query. This uses the URL displayed in the web browser address when a search is performed.
A plain text query which defines the search variables.
IntradocDir
/config/config.cfg
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
"EnableExpirationNotifier" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"NotificationIntervalInDays" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"NotificationMaximum" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"NotifyExtras" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"NotifyTime" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
Checks if only one match was found from a search query.
Generally used to display a message on the search results page.
Returns TRUE
if only one match was found.
Returns FALSE
if no matches or more than one match were found.
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$>
Specifies the name of a ResultSet
column that contains option list values.
Returns the values of the option list ResultSet
column.
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
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
.
Returns the option list name.
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$>
Specifies the name of a ResultSet that contains option list values.
Returns the option list ResultSet.
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@>
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.
Returns TRUE
if the value is nonempty.
Returns FALSE
if the value is an empty string.
Defines a custom script for creation of an option list:
<$customOptionListScript = getValue("#active", fieldName & ":optionListScript")$>
Specifies an include that defines the values for an option list.
Returns the include code.
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@>
Specifies that the metadata field option list can be prefilled with its last value.
Returns TRUE if the option list can be prefilled.
Returns FALSE if the option list cannot be prefilled.
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$>
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
Takes one parameter and one optional argument to the parameter:
The only parameter is a field name, option list key, or variable.
Field name syntax is <$optList fieldName$>
. For custom metadata fields, the field name will resolve to <$optList xFieldName.options$>
, or you can specify the .options
suffix directly.
Option list key syntax is <$optList ListName$>
.
For standard metadata fields, the ListName is the name of the internal option list (such as docAuthors). For more information, see Section 3.6.3.1, "Internal Option Lists."
For custom metadata fields, the ListName is the name of the option list key, such as FieldNameList.
Variable syntax is <$optList variable$>
. The variable must resolve to a field name or an option list key.
One of the following optional arguments can be added to the parameter:
:noselected-No values are selected when the option list is displayed.
:fieldValue-The value specified by the fieldValue variable is selected as the default value in the option list.
Returns a list of values.
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$>
Checks whether a directory page in the Library has a parent page.
Returns TRUE if the directory page is a child (subfolder) of another directory page.
Returns FALSE if the directory page is not a child (subfolder).
Checks if the directory page is a subfolder:
<$PageParent$>
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.
The only parameter is an expression to be parsed.
Returns a Java date object, which is converted to a string for display.
<$parseDataEntryDate$>
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.
The only parameter is an expression to be parsed.
Returns a Java date object, which is converted to a string for display.
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$>
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.
Takes two parameters:
The first parameter is a date string used by the Content Server instance, or a date object created with the parseDate or dateCurrent function.
The second parameter is the date/time pattern, which is a standard Java SimpleDateFormat
pattern string, such as MM/dd/yyyy
.
Returns a Java date object, which is converted to a string for display.
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")$>
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.
Returns the additional virtual path information as a string.
Retrieves additional CGI path information:
<$PATH_INFO$>
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.
Returns the virtual path as a string.
Retrieves the CGI path:
<$PATH_TRANSLATED$>
Enables the left sidebar navigation.
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.
Evaluates to TRUE
or FALSE
.
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$>
Retrieves the string that follows the ? delimiter in the URL for a query.
This variable is specific to the current CGI request.
Returns the query information as a string.
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-->
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.
Takes two parameters:
The first parameter is the string to match.
The second parameter is the expression.
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.*")$>
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 s://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.
Takes three parameters:
The first parameter is the original string.
The second parameter is the string to match.
The third parameter is the replacement string.
The following example returns xyzdef xyzdef
:
<$regexReplaceAll("abcdef abcdef","abc","xyz")$>
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.
Takes three parameters:
The first parameter is the original string.
The second parameter is the string to match.
The third parameter is the replacement string.
The following example returns xyzdef abcdef
:
<$regexReplaceFirst("abcdef abcdef","abc","xyz")$>
Returns the IP address of the remote host making the request.
This variable is specific to the current gateway program request.
Returns the IP address as a string.
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-->
Returns the name of the remote host making the request.
This variable is specific to the current gateway program request.
Returns the host name as a string.
If the hostname is unknown to the server, returns the value of REMOTE_ADDR as a string.
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-->
Retrieves the method that was used to make the request.
This variable is specific to the current gateway program request.
Returns the request method as a string.
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-->
Specifies the error message to be displayed if a required metadata field does not have a value upon checkin.
Returns the error message as a string.
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")$>
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.
Returns the page title as a string.
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)$>
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.
Takes two parameters:
The name of the table where the keys are stored.
The key to be localized.
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.
This function has one parameter, resultSetName
, which is the name of the ResultSet to return.
A ResultSet object if found, otherwise null.
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"))$>
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.
Takes two parameters:
The first parameter is the name of the ResultSet to get new fields (columns) added.
The second parameter is a comma separated list of fields to add.(the column names to be added).
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsAddFields(rsName, fieldsList)$>
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.
The following table lists parameters for the function.
Parameters | Description |
---|---|
|
The name of the ResultSet. |
|
A comma-separated list of fields to append to the ResultSet. Any specified fields that already exist in the ResultSet are ignored. |
|
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. |
Nothing.
<$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 |
<$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 |
<$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 |
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.
Takes two parameters:
The first parameter is the name of ResultSet to be modified so that it has an new row count column.
The second parameter is the name of the field that will hold the row count.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsAddRowCountColumn(rsName, countFieldName)$>
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.
Takes two parameters:
The first parameter is the ResultSet that will be modified by the merge.
The second parameter is the ResultSet containing the rows that will be appended to the target.
Returns TRUE
if the function is successful.
Returns FALSE
if the function fails.
<$rsAppend("targetRsetName", "sourceRsetName")$>
Appends a new row to the end of the ResultSet. The current row is not affected.
The only parameter is the name of the ResultSet to receive the new row.
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
<$rsAppendNewRow("SearchResults")$>
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.
Takes two parameters:
The first parameters the name of the ResultSet that is to get new rows.
The second parameter is the new values to add.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$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 |
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.
Takes four parameters:
The first parameter is the ResultSet that is providing the rows to copy.
The second parameter is the new ResultSet created by the copy.
The third parameter is the name of the field being tested.
The fourth parameter is the pattern match to apply to see if the row should be copied.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsCopyFiltered(rsNameSource, rsNameTarget, filterField, filterPattern)$>
This function sets an Idoc Script variable with a shared reference to a pre-existing ResultSet in the request data.
This function has the following parameters.
Parameters | Description |
---|---|
|
The name of a pre-existing ResultSet. |
|
The name of the variable that will share a reference to precisely the same ResultSet. |
If successful, returns TRUE.
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")$>
Creates a ResultSet initialized with the list of fields in fieldList
. All the fields will be set as string
type.
Takes two parameters:
The first parameter is the name of the ResultSet to create.
The second parameter is a comma separated list of fields.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsCreateResultSet(rsName, fieldList)$>
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).
The only parameter is the name of the ResultSet whose current row is deleted.
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
<$rsDeleteRow("Folders")$>
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.
The only parameter is the name of a ResultSet whose current row contains information about a content item.
Returns TRUE if the user is allowed to view the URL of the content item.
Returns FALSE if the user is not allowed view the URL or the ResultSet is empty.
Checks if the user can view the URL of the content item in the current row of resultSet1
.
<$rsDocInfoRowAllowDisclosure("resultSet1")$>
Checks to see if a ResultSet exists.
Takes one parameter, the name of the ResultSet.
Returns TRUE if the ResultSet is found.
Returns FALSE if the ResultSet does not exist or if it is empty.
<$if rsExists("resultSet1")$> code to execute if TRUE <$endif$>
Retrieves the name of the field at a specified column index, starting from zero.
Takes two parameters:
The name of the ResultSet.
The index number.
<$rsFieldName = rsFieldByIndex("resultSet1", "2")$>
Checks to see if the named ResultSet contains the specific field.
Takes two parameters:
The name of the ResultSet to be searched.
The name of the field to be found.
Returns TRUE if the field is found.
Returns FALSE if the field does not exist.
<$if rsFieldExists("resultSet1", "FieldName1")$> code to execute if TRUE <$endif$>
Searches the first column of a ResultSet for a matching value.
Takes two parameters:
The first parameter is the name of a ResultSet whose first column is to be searched.
The second parameter is the value to be searched for.
Returns TRUE if the specified value is found in the first column of the specified ResultSet.
Returns FALSE if the specified value is not found.
Searches the first column of resultSet1 until a value matching value1 is found.
<$rsFindRowPrimary("resultSet1","value1")$>
Moves to the first row in a ResultSet.
The only parameter is the name of a ResultSet.
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
Advances the SearchResults
ResultSet to the first row:
<$exec rsFirst("SearchResults")$>
Inserts a row just before the current row of the ResultSet being manipulated. The new row then becomes the current row.
The only parameter is the name of the ResultSet in which to have a new row inserted.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsInsertNewRow("SearchResults")$>
Checks the status of the current row in a ResultSet.
Takes one parameter, the name of the ResultSet.
Returns TRUE if the ResultSet is currently on a valid row.
Returns FALSE if not on a valid row.
<$if rsIsRowPresent("resultSet1")$> code to execute if TRUE <$endif$>
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).
This function has the following parameters:
Parameters | Description |
---|---|
|
The name of the ResultSet to loop over. |
|
The name of the resource include to execute. |
The combined output of the various iterations of the resource include.
<$rsLoopInclude(resultSetName, includeName)$>
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.
This function has the following parameters.
Parameters | Description |
---|---|
|
The name of the ResultSet to make active. |
|
The name of the resource include to execute. |
The output of the resource include.
<$rsLoopSingleRowInclude(resultSetName, includeName)$>
Creates a single-column ResultSet from an option list.
Takes two required parameters and one optional parameter:
The first parameter is the name of the ResultSet to be created.
The second parameter is the name of an existing option list (for example, docAccounts
or xMyCustomField.options
).
The third optional parameter is the name of the ResultSet column. If no value is specified, the column name defaults to row
.
Creates a ResultSet with one column, populated by the values in the specified option list.
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 |
Creates a single-column ResultSet from a string.
Takes two required parameters and one optional parameter:
The first parameter is the name of the ResultSet to be created.
The second parameter is a comma-delimited list of strings to be parsed (such as a,b,c,d
), or a variable that has a comma-delimited string as its value.
The third optional parameter is the name of the ResultSet column. If no value is specified, the column name defaults to row
.
Creates a ResultSet with one column, populated by the specified string values.
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 |
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.
Takes three parameters:
The first parameter (rsNameTarget) is the ResultSet that will be modified by the merge.
The second parameter (rsNameSource) is the ResultSet containing the rows that will be merged into the target.
The third parameter (rsCommonField) is the field that occurs in both results sets that will be used as the basis of the merge.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsMerge(rsNameTarget, rsNameSource, commonField$>
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.
Takes three parameters:
The first parameter (rsNameTarget) is the ResultSet that will be modified by the merge.
The second parameter (rsNameSource) is the ResultSet containing the rows that will be merged into the target.
The third parameter (rsCommonField) is the field that occurs in both results sets that will be used as the test for which rows to remove from rsNameTarget
.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsMergeDelete(rsNameTarget, rsNameSource, rsCommonField)$>
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
.
Takes three parameters:
The first parameter (rsNameTarget) is the ResultSet that will be modified by the merge.
The second parameter (rsNameSource) is the ResultSet containing the rows that will be merged into the target.
The third parameter (rsCommonField) is the field that occurs in both results sets that will be used as the basis of the merge
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$rsMergeReplaceOnly(rsNameTarget, rsNameSource, rsCommonField) $>
Moves to the next row in a ResultSet.
The only parameter is the name of a ResultSet.
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
Advances the SearchResults ResultSet to the next row:
<$exec rsNext("SearchResults")$>
Provides a count of the number of fields in a ResultSet. This is useful when combined with rsFieldByIndex
.
Takes one parameter, the name of the ResultSet.
Returns the number of fields.
<$numFields = rsNumFields("resultSet1")$>
Provides a count of the number of rows in a ResultSet.
Takes one parameter, the name of the ResultSet.
Returns the number of rows.
<$numRows = rsNumRows("resultSet1")$>
Removes a ResultSet.
Takes one parameter, the name of the ResultSet.
<$rsRemove("resultSet1")$>
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$>
Takes two parameters:
The first parameter is the name of an existing ResultSet.
The second parameter is the new ResultSet name. The call will fail if the ResultSet already exists.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
Renames the SearchResults
ResultSet to MySearchResults
:
<$rsRename("SearchResults", "MySearchResults")$>
Renames a field in the ResultSet.
Takes three parameters:
The first parameter is the name of the ResultSet whose field is being renamed.
The second parameter is the current name of the field.
The third parameter is the new name of the field.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
Renames the invoice
field to outlays
in the warehouse
ResultSet.
<$exec rsRenameField("warehouse", "invoice", "outlays")$>
Moves to a specified row in a ResultSet.
Takes two parameters:
The first parameter is the name of the ResultSet.
The second parameter is the number of the row.
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
Advances the SearchResults
ResultSet to the 10th row:
<$exec rsSetRow("SearchResults",10)$>
Sorts a ResultSet by a particular column.
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 |
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
Sorts the SearchResults
ResultSet by Content ID in descending order:
<$rsSort("SearchResults","dDocName","string","desc")$>
Sorts a ResultSet that is a representation of an XML data structure (with nodes, parent nodes, and depth attributes).
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 |
Returns TRUE if the function is successful.
Returns FALSE if the function fails or the ResultSet is empty.
Sorts the discussionPosts
ResultSet by the itemNumber
column in ascending order:
<$rsSortTree("discussionPosts", "discussionPosts!itemNumber", "discussionPosts!parentNumber", "dpItemNestLevel", "discussionPosts!itemNumber", "int", "asc")$>
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.
As script, returns the value of the configuration setting:
<$SafeDir$>
"IdcAnalyzeLogDir" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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.
Returns the relative path as a string.
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-->
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
As a configuration setting:
SelfRegisteredAccounts=#none(RWDA),USERS/<$NewUser$>,BOS(R)
As script, returns the defined account information as a string:
<$SelfRegisteredAccounts$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
As a configuration setting:
SelfRegisteredRoles=guest,salesRole
As script, returns the defined roles as a string:
<$SelfRegisteredRoles$>
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.
Returns the server information as a string.
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-->
Retrieves the web server port number to which the request was sent.
This variable is specific to the current gateway program request.
Returns the port number as a string.
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-->
Returns the protocol and revision of the incoming request.
This variable is specific to the current gateway program request.
Returns a string in the format protocol/revision
.
As information output to a log:
SERVER_PROTOCOL=HTTP/1.0
As part of an Idoc Script statement or evaluation:
<$if SERVER_PROTOCOL$>
<!--statement-->
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.
Returns a string in the format name/version
.
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-->
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.
The only parameter is the content type.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$setContentType("text/plain")$>
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.
This function can take three parameters:
The first parameter is the name of the cookie.
The second parameter is the value to be set.
The third optional parameter is an expiration indicator specifying when the cookie will expire.
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))$>
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
The only parameter is an absolute date, formatted in the manner HTTP requires, after which this page should be refreshed
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
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"))$> >
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
Takes two parameters. For example:
setHttpHeader(headerName, headerValue)
Parameter | Description |
---|---|
headerName |
The name of a valid HTTP header. |
headerValue |
The value for the header. |
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
This sets the content-type to XML, to enable your browser to render it with the passed XSLT.
<$setHttpHeader("Content-Type", "text/xml")$>
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
The only parameter is the lifetime of this page in seconds.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
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")$>
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.
Takes two parameters:
The first parameter is the name of the include.
The second parameter is a string that defines the contents of the include. This string can contain Idoc Script.
Returns 0 if the include could not be parsed, 1 if it can be parsed.
Use exec
to suppress this behavior.
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)$>
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.
Takes three parameters:
The first parameter is the target area to be set (either #local or the name of a ResultSet)
The second parameter is the name of key that holds the value to be set (either a local variable or a ResultSet field)
The third parameter is the value to be set.
Returns TRUE if the function is successful.
Returns FALSE if the function fails.
<$setValue(target, name, value)$>
Evaluates if the current revision is in a contributor step of a Basic workflow.
Returns TRUE if the revision is in a contributor step.
Returns FALSE if the revision is not in a contributor step.
Evaluates if revision is in a contributor step:
<$if not SingleGroup$>
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."
Returns the Content ID as a string.
Sets the dID variable to the value of the current HCSF page:
<input type=hidden name="dID" value="<$SourceID$>">
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.
Returns 0 if the last function call was successful.
Returns -1 if the last function call failed.
Returns the current status code:
<$StatusCode$>
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.
Returns OK if the last function call was successful.
Returns a localized error message if the last function call failed.
Returns the current status message:
<$StatusMessage$>
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.
None.
Returns TRUE if the current user has access to the content item.
Returns FALSE if the current user does not have access to the content item.
Compares the permission level of the user to the requested content item:
<$stdSecurityCheck()$>
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."
Takes two parameters:
The first parameter is the string.
The second parameter is the string length.
Returns a string with spaces on both sides.
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)$>
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.
Takes two parameters:
The first parameter is the string.
The second parameter is the token.
<$myString = strCommaAppendNoDuplicates(myString, "A")$> <$myString = strCommaAppendNoDuplicates(myString, "B")$> <$myString = strCommaAppendNoDuplicates(myString, "C")$> <$myString = strCommaAppendNoDuplicates(myString, "A")$> <$myString = strCommaAppendNoDuplicates(myString, "B")$>
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."
Takes two parameters:
The first parameter is the string.
The second parameter is the maximum string length.
Returns a string.
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)$>
Defines a string padding character.
Defines the character used for padding by the strConfine
Idoc Script function.
The default is a period (dot).
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
Used as a configuration entry:
StrConfineOverflowChars=.
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."
Takes two parameters:
The first parameter is a string.
The second parameter is the string to be compared to the first parameter.
Returns TRUE if the strings are equal.
Returns FALSE if strings are not equal.
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")$>
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."
Takes two parameters:
The first parameter is a string.
The second parameter is the string to be compared to the first parameter.
Returns TRUE if the strings are equal.
Returns FALSE if strings are not equal.
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")$>
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.
Takes the length of the string as a parameter.
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."
Takes two parameters:
The first parameter is a string.
The second parameter is the possible substring.
If the second string is a substring of the first, returns an index value that indicates where in the first string the substring begins. The first character has an index value of 0.
If the second string is not a substring of the first, returns a value of -1.
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$>
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."
Takes three parameters:
The first parameter is the string.
The second parameter is the fill character.
The third parameter is the length.
Returns a string, left-filled with the specified character if necessary,.
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)$>
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."
Takes two parameters:
The first parameter is the string.
The second parameter is the length.
Returns a string, left-filled with spaces if necessary.
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)$>
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."
The only parameter is the string.
Returns an integer value.
Evaluates the length of the string home
and returns the integer 4:
<$strLength("home")$>
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."
The only parameter is the string.
Returns a string in all lowercase letters.
Evaluates the string Home
and returns home.
<$strLower("Home")$>
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."
The only parameter is the string.
Returns a string with no spaces.
Formats the string h o m e
as the string home
:
<$strRemoveWs("h o m e")$>
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."
Takes three parameters:
The first parameter is the string on which the substitution will be performed.
The second parameter is the substring to be replaced.
The third parameter is the substring that will replace the existing substring.
Returns a string.
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()),"/",".")$>
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.
Takes three parameters:
The first parameter is the string on which the substitution will be performed.
The second parameter is the substring to be replaced.
The third parameter is the substring that will replace the existing substring.
Returns a string.
<$hello = "Hello world! I love the world!"$> <$strReplaceIgnoreCase(hello, "WORLD", "universe")$>
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."
Takes three parameters:
The first parameter is the string.
The second parameter is the fill character.
The third parameter is the length.
Returns a string, right-filled with the specified character if necessary,.
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)$>
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."
Takes two parameters:
The first parameter is the string.
The second parameter is the length.
Returns a string, right-filled with spaces if necessary.
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)$>
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."
Takes either two or three parameters:
The first parameter is the string.
The second parameter is a number representing the start index.
The third optional parameter is a number representing the stop index.
Returns a substring.
If the stop index parameter is specified, the substring starting with the character at the start index and ending one character before the stop index is returned.
If the stop index parameter is not specified, the substring from the start index to the end of the string is returned.
Retrieves the first two characters of the string my:
<$strSubstring("mystring",0,2)$>
Retrieves the string after the second character string:
<$strSubstring("mystring",2)$>
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."
The only parameter is the string.
Returns a string with no leading or trailing spaces.
Formats the string " homepage "
as the string homepage
:
<$strTrimWs(" homepage ")$>
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."
The only parameter is the string.
Returns a string in all uppercase letters.
Evaluates the string Home
and returns HOME
.
<$strUpper("Home")$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Internet tab, Administrator Mail Address
Admin Server, Internet Configuration, Administrator Mail Address
IntradocDir
/config/config.cfg
As a configuration setting:
SysAdminAddress=admin@example.com
As script, returns the value of the configuration setting:
<$SysAdminAddress$>
"MailServer" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
"SmtpPort" in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
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
.
Returns a string.
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>
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.
Returns the path as a string.
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>
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.
Returns the template name as a string.
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>
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
.
Returns the template type as a string.
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>
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."
The only parameter is the string.
Returns an integer value. If the string does not evaluate to a number, or evaluates to a non-integer number, an error is thrown.
Converts the string 4 to an integer and returns the value 4:
<$toInteger("4")$>
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.
Takes one required and two optional parameters:
The first parameter is the message which is output. The value can be one of the following:
A string. If the string is passed as the only parameter, the IsPageDebug variable must be set for this function to execute. The string is added to the accumulated debug trace.
#local
, which prepares a dump of all current local variables.
#all
, which prepares a full HDA dump of all local data, ResultSets, and environment data.
The second (optional) parameter is the location where the message will be relayed. The values can be the following:
#console
, to display to a console
#log
to log a message in the HTML log files
the name of a variable (such as StatusMessage). In that case, the message is appended to the current value.
The third (optional) parameter is for the appropriate tracing section and is only relevant if the location parameter is set to #console
.
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$>
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.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
IntradocDir
/config/config.cfg
As a configuration setting, enables the Upload Applet:
UploadApplet=true
As script, evaluates the condition of the Upload Applet:
<$UploadApplet$>
Formats a string for use in a URL.
This function converts blank spaces and reserved characters to an escape sequence.
The only parameter is the string.
Returns a string formatted for use in a URL.
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")$>
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.
The only parameter is the string.
Returns a string formatted for use in a URL.
<$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)))$>
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.
Returns TRUE
if highlighting is enabled.
Returns FALSE
if highlighting is not enabled.
Returns search keyword highlighting status:
<$UseHtmlOrTextHighlightInfo$>
Retrieves a comma-delimited list of accounts the current user is assigned to.
The #none
entry indicates privileges to content items that have no account assigned.
The #all
entry indicates privileges to all accounts.
Returns the account list as a string.
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$>
Retrieves the email address of the current user.
Returns the email address as a string.
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$>
Checks the application rights of the current user.
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 |
Displays application rights of the current user:
<$UserAppRights$>
For example, the following combinations would result in the following numbers:
User Admin + Web Layout Editor = 3
Repository Manager + Workflow Admin + Archiver = 44
All six applications = 63
Retrieves the default account for the current user.
Returns the account name as a string.
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$>
The full name of the current user.
Returns the user's full name as a string.
If the user is not logged in, returns the string anonymous
.
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$>
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:
R: Read. Specified as 1.
W: Write. Specified as 2.
D: Delete. Specified as 4.
A: Administration. Specified as 8.
Takes two parameters:
The first is the account name.
The second is the access level to be checked.
Returns TRUE if the current user has the specified access.
Returns FALSE if the user does not have the specified access.
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)$>
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:
R: Read
W: Write
D: Delete
A: Administration
Takes two parameters:
The security group to be checked.
The access level to be checked.
Returns TRUE if the current user does have the specified access.
Returns FALSE if the user does not have the specified access.
Evaluates whether the user has the specified role:
<$userHasGroupPrivilege("Public", "R")$> <$userHasGroupPrivilege("Secure", "A")$>
Checks if the current user has a particular role.
The only parameter is the name of a role.
Returns TRUE if the current user does not have the specified role.
Returns FALSE if the user does not have the specified role.
Evaluates whether the user has the specified role:
<$userHasRole("admin")$>
Checks if the current user has rights to any administration applets.
Returns TRUE if the user has any administrative rights.
Returns FALSE if the user does not have any administrative rights.
Evaluates administrative rights of user:
<$UserIsAdmin$>
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.
Returns the code for the preferred language.
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.
Returns the name of the preferred language.
Retrieves the username of the current user.
Returns the username as a string.
If the user is not logged in, evaluates to the string anonymous
.
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$>
Retrieves a comma-delimited list of roles the current user belongs to.
Returns the user role list as a string.
For example:
PublicContributor,ClassifiedConsumer
References the list of user roles:
<$if UserRoles$> <$include optional_field$> <$endif$>
Enables the secure sockets layer (SSL).
This setting affects the variables HttpWebRoot
and HttpCgiPath
.
Use the Secure Sockets Layer only if you are using an SSL-enabled web server.
When set to TRUE
, SSL is used (https
instead of http
).
Default is FALSE
.
Configuration variables, described in the Oracle Fusion Middleware Configuration Reference for Oracle WebCenter Content
System Properties, Internet tab, Use Secure Sockets Layer
IntradocDir
/config/config.cfg
As a configuration setting, enables SSL:
UseSSL=true
As script, returns the value of the configuration setting:
<$UseSSL$>
Checks if search keyword highlighting for XML documents is enabled. When set to TRUE, an XML URL is constructed when performing a keyword search.
Returns TRUE if XML keyword highlighting is enabled.
Returns FALSE if XML keyword highlighting is not enabled.
Returns the status of search keyword highlighting for XML documents.
<$UseXmlUrl$>
UseHtmlOrTextHighlightInfo
EnableDocumentHighlight
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.
Takes two parameters:
The first parameter is the name of a user topic HDA file.
The second parameter is the name of a property defined in the user topic file.
Returns the value of the property in the specified user topic file.
Returns the value of the emailFormat
property in the current user's pne_portal.hda
file:
<$utGetValue("pne_portal","emailFormat")$>
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.
The only parameter is the name of a user topic HDA file.
Loads the current user's wf_in_queue.hda
file and makes it available to other user topic functions:
<$utLoad("wf_in_queue")$>
Used to retrieve information about a user's current My Check In and My Search links for content profiles.
Takes two parameters:
The user topic name.
The name of the ResultSet containing the content profiles available for the user on the personalization links.
<$utLoadDocumentProfiles("pne_portal", "PneDocumentProfiles")
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.
Takes two parameters:
The first parameter is the name of a user topic HDA file.
The second parameter is the name of a ResultSet defined in the user topic file.
Returns TRUE if the ResultSet is successfully loaded into the DataBinder.
Returns FALSE if the function fails.
Loads the SavedQueries
ResultSet from the current user's pne_portal.hda
file into the DataBinder:
<$utLoadResultSet("pne_portal","SavedQueries")$>
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:
tableEntry
xxsmall
strongHighlight
Returns the name of the value style.
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$>
Retrieves the action that is currently being performed on the revision.
This variable is set after the Exit event of a workflow step, so it is normally evaluated during the Entry event of the next step.
The possible actions are:
APPROVE
REJECT
CHECKIN
CONVERSION
META_UPDATE
TIMED_UPDATE
RESUBMIT
Returns the name of the action as a string.
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$>
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.
Takes three parameters:
The first parameter is the workflow action.
The second parameter is the message associated with the action.
The third parameter is a comma-delimited list of users for the current workflow step,. See wfComputeStepUserList
for a function which computes the current list.
Retrieves the exit condition that has been defined for the current step.
Returns the exit condition as a string.
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"
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.
Takes two parameters:
The first parameter indicates the user name, alias, or token name.
The second parameter indicates the type, either user or alias.
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")$>
Computes the list of users from the current step in the workflow.
Returns a comma-delimited list of users.
Retrieves a local state value from the companion file.
The only parameter is the key.
Returns the local state value from the companion file.
Returns the value of the local key <step_name>@<workflow_name>.myKey
:
<$wfCurrentGet("myKey")$>
Sets the local state value of a key in the companion file.
Takes two parameters:
The first parameter is the key.
The second parameter is the value.
Sets the key <step_name>@<workflow_name>.myKey
to myValue
:
<$wfCurrentSet("myKey", "myValue")$>
Retrieves the name of a step relative to the current step.
The only parameter is an integer that represents the number of steps relative to the current step.
Returns a step name.
Reaching the beginning or the end of the workflow returns the name of the first or last step, respectively.
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")$>
Retrieves the exit condition for a workflow step.
Takes three parameters:
The first parameter is the workflow name.
The second parameter is the step name.
The third parameter is the exit condition to be displayed.
Returns the exit condition expression.
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:
dWfName
is the internal variable for the workflow name.
currentStepName
is set earlier in the template page to be equal to dWfName
, which is the internal variable for the step name.
wfAdditionalExitCondition
is the internal variable for the exit condition expression. Typical exit condition output would look like:
dSecurityGroup like "Secure"
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.
Takes two parameters:
The first parameter indicates the number of jumps to rewind.
The second parameter indicates the target step relative to the step determined by the first parameter.
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)$>
Retrieves a state value from the companion file.
The only parameter is the state key.
Returns the state value from the companion file.
Returns the current jump name:
<$wfGet("wfJumpName")$>
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).
The only parameter is the internal workflow step type value.
<$wfGetStepTypeLabel(stepType)$>
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.
Returns TRUE if the document has finished conversion.
Returns FALSE if the content item is still in GENWWW and has not finished conversion.
<$wfIsFinishedDocConversion()$>
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.
Returns TRUE if notifications are suppressed.
Returns FALSE if notifications are not suppressed.
<$wfIsNotificationSuppressed()$>
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
).
Returns TRUE if the document is available to be released.
Returns FALSE if the content item is not available to be released. For example, the content item has not completed the check in and/or conversion process.
<$wfIsReleasable()$>
Turns the jump entry notification on and off.
If this variable is TRUE, reviewers will not be notified when the jump is entered.
If this variable is FALSE, reviewers will be notified when the jump is entered.
Returns TRUE or FALSE.
The following code sets the step entry notification to 0, which means that reviewers will be notified upon jump entry:
<$wfSet("wfJumpEntryNotifyOff","0")$>
Defines a message that will be included in the notification e-mail that is sent to users when a jump is entered.
If no message is specified, the e-mail message will include only the information in the e-mail template.
The jump message can include Idoc Script, which must be executed using the eval function. For example:
<$eval(dDocName)$> is ready for your review.
Returns the message as a string.
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")$>
Retrieves the name of the current jump.
Returns the jump name as a string.
The following code sets the name of the current jump to MyJump
:
<$wfSet("wfJumpName","MyJump")$>
Retrieves the name of the step in the parent workflow that the revision returns to upon exiting a workflow after the current jump.
The return step applies only if the revision properly completes the last step in the workflow that was jumped to and exits the workflow normally. Consequently, the return step is not applied when the revision jumps to another workflow.
In the companion file, the return step is stored in the local key:
<step_name>@<workflow_name>.returnStep
Returns the step name as a string.
The following code sets the return step to be the next step in the parent workflow:
<$wfSet("wfJumpReturnStep",wfCurrentStep(1))$>
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.
Returns the step name as a string.
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)$>
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.
Takes one parameter, the name of the workflow.
Returns the information as a ResultSet.
<$wfLoadDesign(WorkflowName)$>
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.
Returns the subject line as a string.
Notifies the original author with the subject line "Content ID has been released":
<$wfMailSubject="File <$dDocName$> has been released"$> <$wfNotify(dDocAuthor, "user")$>
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.
Returns the message as a string.
Notifies the original author with the message "Content ID has been released"
:
<$wfMessage="File <$dDocName$> has been released"$> <$wfNotify(dDocAuthor, "user")$>
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.
Takes two parameters and an optional third parameter:
The first parameter specifies the user name, alias, or token to be notified.
The second parameter indicates the type, either user, alias or token.
The optional third parameter specifies the name of the e-mail template to use for constructing the message. (See the IdcHomeDir
/resources/core/templates/templates.hda
file for template definitions.)
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")$>
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
Returns the parent list as a string.
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
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.
<$wfReleaseDocument()$>
Sets a key with a particular value in the companion file.
Takes two parameters:
The first parameter is the key.
The second parameter is the value.
Sets the key wfJumpName
to MyJump
:
<$wfSet("wfJumpName", "MyJump")$>
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.
Takes one parameter, the internal flag. If set to 1 (TRUE), notifications are suppressed. If set to 0 (FALSE), notifications are not suppressed.
<$wfSetSuppressNotification(1)$>
Sends the revision to the first step in the current workflow. Note that this variable begins with an uppercase W.
Sets the target step for a jump to restart the workflow:
<$wfSet("wfJumpTargetStep",WfStart)$>
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
Takes two parameters:
The first parameter is the name of the metadata field.
The second parameter is the value of the metadata field.
Defines "This is my comment." as the value of the Comments field:
<$wfUpdateMetaData("xComments", "This is my comment.")$>
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 "&" 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.
The only parameter is the string.
Returns a string formatted for use in a URL.
Escapes the ampersand and returns the XML formatted string, "Me & you."
<$xml("Me & you.")$>
Escapes the non-alphanumeric characters and returns the XML-formatted string, "Test the ", >, and < characters."
<$xml("Test the \", >, and < characters.")$>