Write an Expression to Hide a Presentation Object

You can write an expression to hide a subject area, presentation table, presentation column, or hierarchy. These expressions determine if or when hidden objects are visible to users when they create visualizations and analyses.

The presentation object's Hide if field controls a presentation object's visibility and doesn't affect the ability to access the object. For example, you can query a hidden presentation object using a tool such as nqcmd.

You can specify three different types of expressions in the Hide If field:

  • Constant - Use any non-zero constant in the field to hide the object. Use zero (0) or leave the field blank to display the object.

  • Session variable - You can use a session variable in the expression to control whether the object is hidden. If the expression evaluates to a non-zero value, the object is hidden. If the expression evaluates to zero, is empty, or has no value definition, the object is displayed. The session variable must be populated using a session initialization block or a row-wise initialization block. You must properly populate the session variable to control the visibility.

    The SQL for the init block can use CASE statements to control whether to return zero or a non-zero number in the session variable. For example:

    VALUEOF(NQ_SESSION."VISIBLE")

    Session variable names that include periods must be enclosed in double quotes.

  • Session variable comparison - You can use an equality or inequality comparison to control whether the object is hidden, using the following form:

    'session_variable_expression' '=|<>' 'constant'

    If the expression evaluates to zero, null, or empty, the object is displayed. If the expression evaluates to a non-zero value, the object is hidden. For example:

    NQ_SESSION."VISIBLE" = 'ABC'
    NQ_SESSION."VISIBLE" <> 'ABC'
    

    You must enclose session variable names that include periods in double quotes.

    You can use any scalar function supported by Oracle Analytics in the Hide object if expression. Scalar functions include any function that accepts a simple value for each of its arguments and returns a single value. You can use the functions listed, except for functions that return non-deterministic results like RAND, NOW, CURRENT_DATE, CURRENT_TIMESTAMP, and CURRENT_TIME.

    • All String Functions.

    • Math Functions, except RAND.

    • Calendar Date/Time Functions, except NOW, and CURRENT_DATE.

    • Conversion Functions such as CAST, IFNULL, TO_DATETIME, and VALUEOF.

    For example, this expression checks to see if the NQ_SESSION.VISIBLE session variable begins with the letters ABC:

    LEFT(VALUEOF(NQ_SESSION."VISIBLE"), 3) = 'ABC'

    The following expression checks to see if the given variable begins with ExtnAttribute:

    Left(VALUEOF(NQ_SESSION."ADF_LABEL_ORACLE.APPS.CRM.MODEL.ANALYTICS.
    APPLICATIONMODULE.CRMANALYTICSAM_CRMANALYTICSAMLOCAL_CRMANALYTICSAM.
    OPPORTUNITYAM.OPPORTUNITY_EXTNATTRIBUTECHAR001"), 13) = 'ExtnAttribute'
    

Run Check Consistency to find any inconsistencies in the visibility filter expression.