Oracle Apex - Condition (Display, Processing)

Card Puncher Data Processing

About

A condition is a small unit of logic that helps you control:

  • the display of regions, items, buttons, charts, and tabs
  • and the execution of processes, computations, and validations.

The conditions have an object scope, not a row scope. You cannot for instance in a report, display an item (a column) for a certain value in the row and hide it for an other. You can have such a condition when you want to hide a link if the next report showing a calculation depends on a status column. If the calculation is not good, there is no added value to show the next page. You need to use a CSS formatting technique. See conditional formatting/navigation

Example

When you apply a condition to a button, the rendering engine evaluates the condition during the rendering (or Show Page) process. Whether the condition passes or fails determines if the page control (such as a button) displays.

List

Code Description
- No Condition -
EXISTS Exists (SQL query returns at least one row)
NOT_EXISTS NOT Exists (SQL query returns no rows)
SQL_EXPRESSION SQL Expression
PLSQL_EXPRESSION PL/SQL Expression
FUNCTION_BODY PL/SQL Function Body Returning a Boolean
REQUEST_EQUALS_CONDITION Request = Expression 1
REQUEST_NOT_EQUAL_CONDITION Request != Expression 1
REQUEST_IN_CONDITION Request Is Contained within Expression 1
REQUEST_NOT_IN_CONDITION Request Is NOT Contained within Expression 1
VAL_OF_ITEM_IN_COND_EQ_COND2 Value of Item / Column in Expression 1 = Expression 2
VAL_OF_ITEM_IN_COND_NOT_EQ_COND2 Value of Item / Column in Expression 1 != Expression 2
ITEM_IS_NULL Value of Item / Column in Expression 1 Is NULL
ITEM_IS_NOT_NULL Value of Item / Column in Expression 1 Is NOT NULL
ITEM_IS_ZERO Value of Item / Column in Expression 1 = Zero
ITEM_IS_NOT_ZERO Value of Item / Column in Expression 1 != Zero
ITEM_IS_NULL_OR_ZERO Value of Item / Column in Expression 1 Is NULL or Zero
ITEM_NOT_NULL_OR_ZERO Value of Item / Column in Expression 1 Is NOT null and the Item Is NOT Zero
ITEM_CONTAINS_NO_SPACES Value of Item / Column in Expression 1 Contains No Spaces
ITEM_IS_NUMERIC Value of Item / Column in Expression 1 Is Numeric
ITEM_IS_NOT_NUMERIC Value of Item / Column in Expression 1 Is Not Numeric
ITEM_IS_ALPHANUMERIC Value of Item / Column in Expression 1 Is Alphanumeric
VALUE_OF_ITEM_IN_CONDITION_IN
_COLON_DELIMITED_LIST
Value of Item / Column in Expression 1 Is Contained within Colon Delimited List in Expression 2
VALUE_OF_ITEM_IN_CONDITION_NOT_IN
_COLON_DELIMITED_LIST
Value of Item / Column in Expression 1 Is NOT Contained within Colon Delimited List in Expression 2
USER_PREF_IN_COND_EQ_COND2 Value of User Preference in Expression 1 = Expression 2
USER_PREF_IN_COND_NOT_EQ_COND2 Value of User Preference in Expression 1 != Expression 2
CURRENT_PAGE_EQUALS_CONDITION Current page = Expression 1
CURRENT_PAGE_NOT_EQUAL_CONDITION Current page != Expression 1
CURRENT_PAGE_IN_CONDITION Current Page Is Contained Within Expression 1 (comma delimited list of pages)
CURRENT_PAGE_NOT_IN_CONDITION Current Page Is NOT in Expression 1 (comma delimited list of pages)
WHEN_THIS_PAGE_SUBMITTED Current Page = Page Submitted (this page was posted)
WHEN_THIS_PAGE_NOT_SUBMITTED Current Page != Page Submitted (this page was not the page posted)
PAGE_IS_IN_PRINTER_FRIENDLY_MODE Current Page Is in Printer Friendly Mode
PAGE_IS_NOT_IN_PRINTER_FRIENDLY_MODE Current page is NOT in Printer Friendly Mode
CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2 Text in Expression 1 Is Contained in Value of Item / Column in Expression 2
DISPLAY_COND_IN_COND_TEXT Text in Expression 1 Is Contained within the Text in Expression 2
DISPLAY_COND_NOT_IN_COND_TEXT Text in Expression 1 Is NOT Contained within the Text in Expression 2
DISPLAY_COND_EQUAL_COND_TEXT Text in Expression 1 = Expression 2 (includes &ITEM. substitutions)
DISP_COND_NOT_EQUAL_COND_TEXT Text in Expression 1 != Expression 2 (includes &ITEM. substitutions)
USER_IS_NOT_PUBLIC_USER User is Authenticated (not public)
USER_IS_PUBLIC_USER User is the Public User (user has not authenticated)
DISPLAYING_INLINE_VALIDATION_ERRORS Inline Validation Errors Displayed
NOT_DISPLAYING_INLINE_VALIDATION_ERRORS No Inline Validation Errors Displayed
MAX_ROWS_LT_ROWS_FETCHED SQL Reports (OK to show the forward button)
MIN_ROW_GT_THAN_ONE SQL Reports (OK to show the back button)
BROWSER_IS_NSCP Client Browser: Mozilla, Netscape 6.x/7x or higher
BROWSER_IS_MSIE Client Browser: Microsoft Internet Explorer 5.5, 6.0 or higher
BROWSER_IS_MSIE_OR_NSCP Client Browser: XHTML / CSS capable browser
BROWSER_IS_OTHER Client Browser: Other browsers (or older version)
CURRENT_LANG_IN_COND1 Current Language Is Contained within Expression 1
CURRENT_LANG_NOT_IN_COND1 Current Language Is NOT Contained within Expression 1
CURRENT_LANG_NOT_EQ_COND1 Current Language != Expression 1
CURRENT_LANG_EQ_COND1 Current Language = Expression 1
DAD_NAME_EQ_CONDITION When CGI_ENV DAD_NAME = Expression 1
DAD_NAME_NOT_EQ_CONDITION When CGI_ENV DAD_NAME != Expression 1
SERVER_NAME_EQ_CONDITION When CGI_ENV SERVER_NAME = Expression 1
SERVER_NAME_NOT_EQ_CONDITION When CGI_ENV SERVER_NAME != Expression 1
HTTP_HOST_EQ_CONDITION When CGI_ENV HTTP_HOST = Expression 1
HTTP_HOST_NOT_EQ_CONDITION When CGI_ENV HTTP_HOST != Expression 1
NEVER Never
ALWAYS Always

Snippet

Current Page in Expression 1

3,100,203

If the current page id is 100, then this condition evaluates to true and the condition passes.

Exists (SQL query returns at least one row)

SELECT 1 FROM employees WHERE department_id = :P101_DEPTNO

where:

PLSQL

:MY_ITEM is not NULL

Item is not null

MY_ITEM

Documentation / Reference





Discover More
Oracle Apex Cross Conditional Link With Display
Oracle Apex - (Cross) Conditional Formatting/Navigation

The conditions in Oracle Apex applies to an object. An object as an item may represent a collection of value (ie a column value of a row). When you want to apply a condition only on this value (row), you...
Oracle Apex Authorization Application
Oracle Apex - Authorization

While conditions control the rendering and processing of specific controls or components on a page, authorization schemes control user access. Authorization schemes use the identities established by...
Oracle Apex Request Expression Condition
Oracle Apex - Request

The request is a system variable initialized: with the name of the button when a user clicks. or with the fourth parameter of the Apex URL It will then start the related process. You can...
Card Puncher Data Processing
Oracle Apex - Tabular Form

A form that performs update, insert, and delete operations on multiple rows in a database table. A tabular form is rendered as a report having updatable columns shown using various form elements. ...



Share this page:
Follow us:
Task Runner