Skip Headers
Oracle® Database Application Express User's Guide
Release 3.0

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

Go to previous page
Previous
Go to next page
Next
View PDF

A Available Conditions

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 a condition passes or fails determines whether a control or component displays, or page processing executes.

You can specify conditions by selecting a condition type when you create the control (region, button, or item) or component (tab, list, or navigation bar), or by making a selection under the Condition attribute.

See Also:

"Understanding Conditional Rendering and Processing"

Table A-1 describes many Application Builder conditions. To view a complete listing of all available conditions for a given control or component, click the View icon to the right of the Condition 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 Application Builder.

Table A-1 Available Conditions

Condition Description

Always

Always returns true. Used primarily for the read-only conditions of a page item

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-GB, choose this condition and enter the following string in Expression 1:

en-us,en-gb

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 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 control or 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 controls or 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 information about f?p syntax

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 P101_DEPTNO as a bind variable. You can use bind variables a within an application processes and SQL query regions to reference item session state. If one or more employees are in the department identified by the value of P101_DEPTNO then the condition evaluates as true.

See Also: "About Bind Variable Syntax" for information about bind variables

Never

This condition type is hard wired to always fail. It is useful in temporarily preventing controls or 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 MY_FLOW_ITEM is YES then the condition evaluates as true. Otherwise it evaluates as false.

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 IF: 
END;

Request != Expression 1

REQUEST is an internal attribute that tracks 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. 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 REQUEST application attribute.

This condition evaluates as true if REQUEST does not equal the value entered in Expression 1.

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 REQUEST equals the value entered in Expression 1. From PL/SQL you can also reference the application attribute using the following syntax:

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 REQUEST is contained in the list.

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 Application Express 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: "Understanding Substitution Strings" for information about &MY_ITEM syntax

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 F100_P2_DAY_DATE equals "Wednesday", select this condition enter the following in Expression 1 and Expression 2:

  • Expression 1: F100_P2_DAY_DATE

  • Expression 2: Wednesday

See Also: "Understanding Substitution Strings" for information about &MY_ITEM syntax

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: "Establishing User Identity Through Authentication" for information about 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: "Authentication" for information about Public User

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 F100_P2_WORD is contained within the string "the quick brown fox", enter the following in the Expression 1 and Expression 2 fields:

  • Expression 1: F100_P2_WORD

  • Expression 2: the quick brown fox

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 P1_TODAY is either "Monday", "Tuesday", or "Wednesday", select this condition and enter the following in Expression 1 and Expression 2:

  • Expression 1: P1_TODAY

  • Expression 2: Monday: Tuesday:Wednesday

Value of Item in Expression 1 is NOT NULL

In Expression 1, enter the name (uppercase) 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 nonnull 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 nonnull 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 nonnull 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 nonnull 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 nonnull 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 data access descriptor (DAD) 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 data access descriptor (DAD) 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 common gateway interface (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 not equal to the string in Expression 1.

When cgi_env HTTP_HOST = Expression 1

Checks for the value of the common gateway interface (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 common gateway interface (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 not equal to the string in Expression 1.

When cgi_env SERVER_NAME = Expression 1

This condition checks for the value of the common gateway interface (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.