Oracle® HTML DB User's Guide Release 1.5 Part Number B10992-01 |
|
|
View PDF |
A condition is a small unit of logic that helps you control the display of regions, items, buttons, and tabs as well execute processes, computations and validations. When you apply a condition to a control or component, the condition is evaluated. Whether the condition passes or fails determines whether the control or component displays.
You can specify conditions by selecting a condition type when you create the control or component (that is, the region, item, button, or tab) or by making a selection under the conditional display attribute.
The following table describes some commonly used conditions. To view a complete listing of all available conditions for a given component, click the flashlight icon to the right of the Conditional Display Type list. Shortcuts to common selections appear directly beneath the Type list. If your condition requires an expression, type it in the appropriate field.
Table A-1 describes the conditions available in Oracle HTML DB.
Table A-1 Available Conditions
Condition | Description |
---|---|
Current Language != Expression 1 | Verifies the language setting in which the client browser is not currently running. Evaluates to true if the current language is contained within the string entered in Expression 1. |
Current Language = Expression | Verifies the language setting in which the client browser is currently running. Evaluates to true if the current language matches the value entered in Expression 1. |
Current Language is contained within Expression 1 | Determines whether the browser current language is contained within a string. Evaluates to true if the current language matches the string entered in Expression 1.
For example, to check if the current language is either en-US or en-UK, choose this condition and enter the following string in Expression 1: en-us,en-uk |
Current Language is not contained within Expression 1 | Verifies the application's current language is not contained within a specified string. Evaluates to true if the current language is not contained within the string entered in Expression 1. |
Current page != Expression 1 | Evaluates to true if the current page does not equal the page you specify in Expression 1. |
Current Page != Page Submitted (this page was not the page posted) | Determines if the specified page was not posted. Evaluates to true if the current page does not match the value entered in Expression 1. |
Current page = Expression 1 | Evaluates as true if the current page is in a list of pages found in Expression 1. |
Current page = Expression 1 | Evaluates to true if the current page equals the page you specify in Expression 1. |
Current Page = Page Submitted (this page was posted) | Verifies the whether the specified page was posted. Evaluates to true if the current page matches the value entered in Expression 1. |
Current Page is contained within Expression 1 (comma delimited list of pages) | Verifies if the current page is part of the list of pages you specify in Expression 1. To check if the current page is in either page 1, 2, 3 or 4, select this condition type and enter the following string in Expression 1:
1,2,3,4 |
Current page is in Printer Friendly mode | Only displays certain page components when the user has selected printer friendly mode. If the current page is in printer friendly mode, then the condition evaluates to true. Use f?p syntax to specify printer friendly mode. |
Current page is not in Printer Friendly mode | Hides page components when printer friendly mode is selected. Use f?p syntax to specify printer friendly mode.
See Also: "Using f?p Syntax to Link Pages" for more information on |
Current Page not in Expression 1 (comma delimited list of pages) | Verifies if the current page is not part of the comma separated list of pages specified in Expression 1. |
Exists (SQL query returns at least one row) | This condition is expressed as a SQL query. If the query returns at least one row then the condition evaluates as true. For example:
select 1 from emp where deptno = :P101_DEPTNO This example references item See Also: "About Bind Variables" for more information on bind variables |
Never | This condition type is hard wired to always fail. It is useful in temporarily preventing components (such as regions, buttons, or items) from being rendered on a page, or to prevent processes, computations and validations from running. |
NOT Exists (SQL query returns no rows) | This condition is expressed as a SQL query. If the query does not return any rows, it evaluates as true. |
PLSQL Expression | A PL/SQL expression is any expression in valid PL/SQL syntax that evaluates to true or false. For example:
nvl(:MY_FLOW_ITEM,'NO') = 'YES' If the value of |
PLSQL Function Body returning a boolean | The body of a PL/SQL function that returns true or false. For example:
BEGIN IF :P1_DAY = 'MONDAY' THEN RETURN TRUE; ELSE RETURN FALSE; END; |
Request != Expression 1 | REQUEST is an internal attribute that tracks of how a page is submitted. By default, when a page is submitted, the value of the application attribute REQUEST is set according the name of the object that caused the page to be submitted. For a regular button, REQUEST is set as the name of the button (such as CANCEL or SAVE) not the label of the button. For buttons of type Item or those that appear inline with other items, there is an attribute called REQUEST . You can also set request using f?p syntax.
For example, the event could be when a user clicks a button or selects a tab menu. Depending upon the event, you can perform different operations by referencing the value of the This condition evaluates as true if See Also: "Understanding URL Syntax", "REQUEST ", and "Understanding the Relationship Between Button Names and REQUEST" |
Request = Expression 1 | This condition is the opposite of Request != Expression 1 .
This condition evaluates as true if v('REQUEST') See Also: "Understanding URL Syntax", "REQUEST ", and "Understanding the Relationship Between Button Names and REQUEST" |
Request is contained within Expression 1 | REQUEST is an internal application attribute that tracks of how a page is submitted. By default, when a page is submitted, the value of REQUEST is set according to the event that caused the page to be submitted. For example, the event could be when a user clicks a button or selects a tab. Depending upon the event, you can perform different operations by referencing the value of the REQUEST application attribute.
Use this condition to specify a list of allowed requests (such as SAVE or UPDATE) in Expression 1. The condition evaluates to true if the value of See Also: "REQUEST ", and "Understanding the Relationship Between Button Names and REQUEST" |
Request is not contained within Expression 1 | This condition is the opposite of Request is contained within Expression 1 . Evaluates to true if the value of the REQUEST is not contained within Expression 1.
See Also: "REQUEST ", and "Understanding the Relationship Between Button Names and REQUEST" |
SQL Expression | SQL Expressions are evaluated as a WHERE clause in a SQL statement. For example suppose your expression is :MY_ITEM = 'ABC' .
The HTML DB engine processes the following: select 1 from dual where :MY_ITEM = 'ABC' This condition evaluates to true if a row is returned. |
SQL Reports (OK to show the back button) | Use this condition for reports having pagination. It automatically determines when it is appropriate to include a button that pages back in the result set. |
SQL Reports (OK to show the forward button) | Use this condition for reports having pagination. It automatically determines when it is appropriate to include a button that pages forward in the result set. |
Text in Expression 1 != Expression 2 (includes &ITEM substitutions) | Use this expression to compare two expressions containing strings. Either expression may contain references to session state using &MY_ITEM syntax.
See Also: "Using Substitution Strings" for more information on |
Text in Expression 1 = Expression 2 (includes &ITEM substitutions) | This condition is the opposite of Text in Expression 1 != Expression 2 (includes &ITEM substitutions). Compares two expressions containing strings. Either expression may contain references to session state using the &ITEM. syntax.
To check if the item
See Also: "Using Substitution Strings" for more information on |
User is authenticated (not public) | Verifies whether the current user was authenticated using one of the built-in authentication schemes or a custom authentication scheme.
See Also: "Providing Security Through Authorization" for more information on authentication |
User is the public user (user has not authenticated) | The public user is defined as an application attribute. To set the public user for a specific application, navigate to the Application Builder home page and click the edit link corresponding to your application.
A public user is a user used for multiple users. Sometimes applications have pages that are public and thus require authentication and log in. This condition returns true if the user is the public user (that is, the user is authenticated as themselves or some other user not equal to the public user identified in the application attribute Public User. See Also: "About Session Management" |
Value of Item in Expression 1 != zero | Verifies if the value of the item in Expression 1 does not equal zero. |
Value of item in Expression 1 = Expression 2 | Compares the value of an item with a specific string. Comparisons using this condition are case sensitive.
For example, to verify whether the value of an item
|
Value of Item in Expression 1 = zero | Verifies if the value of the item in Expression 1 does equal zero. |
Value of item in Expression 1 contains no spaces | Evaluate to true if the value of the item specified in Expression 1 contains no spaces. |
Value of Item in Expression 1 is alphanumeric | Evaluates to true when the string in Expression 1 contains only alphanumeric characters. |
Value of Item in Expression 1 is contained within colon delimited list in Expression 2 | Use this condition type to check whether a certain string is contained within the value of a session state item. Verifies whether the string specified in Expression 1 is contained in the value of the item specified in Expression 2. |
Value of Item in Expression 1 is NOT contained within colon delimited list in Expression 2 | Evaluates to true when the value specified in Expression 1 contains a string that lists elements delimited by colons.
To check if the item
|
Value of Item in Expression 1 is NOT NULL | In Expression 1, enter the name (upper case) of the application or page item. Evaluates as true, if the current cache value of the item is not null and has a value. If not, the condition evaluates as false. |
Value of Item in Expression 1 is NULL | Evaluates as true if the item in Expression 1 has no value. |
Value of Item in Expression 1 is NULL or zero | Evaluates as true if the item in Expression is either NULL or zero. |
Value of item in Expression 1 is numeric | Evaluates to true if the value of the Item in Expression 1 is numeric. |
Value of user preference in Expression 1 != Expression 2 | This condition is the opposite of Value of user preference in Expression 1 = Expression 2 . Evaluates to true if the name of the user preference specified in Expression 1 is not equal to the string in Expression 2. |
Value of user preference in Expression 1 = Expression 2 | Verifies the value of a user preferences. Evaluates to true if the name of the user preference specified in Expression 1 is equal to the string in Expression 2. |
When any item in comma delimited list of items has changed | Evaluates to true when the value of any non NULL session state item in the list of items specified in Expression 1 has changed. |
When any item in comma delimited list of pages has changed | Evaluates to true when the value of any non NULL session state item in the list of pages specified in Expression 1 has changed. |
When any item in current application has changed | This condition passes when the value of any non NULL session state item in the current application has changed. |
When any item in current page has changed | Evaluate to true when the value of any non NULL session state item in the current page has changed. |
When any item in current session has changed | Evaluates to true when the value of any non NULL session state item in the current session has changed. |
When cgi_env DAD_NAME != Expression 1 | This condition is the opposite of When cgi_env DAD_NAME = Expression 1 .
Checks for the DAD (Database Access Descriptor) that is being used in the URL to call the current page in the application and compares it to Expression 1. Evaluate to true, when the DAD is not the same as Expression 1. |
When cgi_env DAD_NAME = Expression 1 | Checks for the DAD (Database Access Descriptor) that is being used in the URL to call the current page in the application and compares it to Expression 1. Evaluate to true, when the DAD is the same as Expression 1. |
When cgi_env HTTP_HOST != Expression 1 | This condition is the opposite of When cgi_env HTTP_HOST = Expression 1 .
Checks for the value of the CGI environment variable |
When cgi_env HTTP_HOST = Expression 1 | Checks for the value of the CGI environment variable HTTP_HOST that is the value returned by owa_util.get_cgi_env ('HTTP_HOST') . Evaluate to true, when this value is equal to the string in Expression 1. |
When cgi_env SERVER_NAME != Expression 1 | This condition is the opposite of When cgi_env SERVER_NAME = Expression 1 .
This condition checks for the value of the CGI environment variable |
When cgi_env SERVER_NAME = Expression 1 | This condition checks for the value of the CGI environment variable SERVER_NAME , that is the value returned by owa_util.get_cgi_env ('SERVER_NAME') . Evaluate to true, when this value is equal to the string in Expression 1. |