16.5 Managing Application-Level Items

Application-level items do not display, but are used as global variables to the application. You can use an application item as a global variable.

Topics:

16.5.1 Creating an Application-Level Item

To create an application-level item:

  1. Navigate to the Shared Components page:
    1. On the Workspace home page, click App Builder.
    2. Select an application.
    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Application Logic, select Application Items.

    The Application Items page appears.

  3. To create an application item, click Create.

    The Create/Edit page appears.

  4. For Name:
    1. Name - Enter a name for the application-level item.
    2. Scope - Options include:
      • Global - Select this option if the application shares session state with other applications in the same workspace.

      • Application - Select this option if the application does share session state with another application.

  5. For Security, Datatype - Select datatype for this item.
  6. For Security, Session State Protection - Select session state protection for this item. Options include:
    • Unrestricted - The item's session state may be set by passing the item name/value in a URL or in a form. No checksum is required in the URL.

      Note:

      If you must set this item's value in session state using Ajax, then an Unrestricted protection level must be used for the item (for example in Dynamic Actions, Set Value, Page Items to Submit or Cascading LOVs, Page Items to Submit).

    • Restricted - May not be set from browser - The item may not be altered using the URL or POSTDATA. Use this option when you want to restrict the way that the item value can be set to internal processes, computations, and so on. This attribute is only applicable only to items that cannot be used as data entry items and is always observed even if Session State Protection is disabled. This attribute may be used for application items or for page items with any of these Display As types:

      • Display Only (Save State=No)

      • Display Only (Save State=No)

      • Stop and Start Grid Layout (Displays label only)

    • Checksum Required: Application Level - The item's session state may be set by passing the item name/value in a URL if a checksum specific to the schema is provided. A user-level checksum or a session-level checksum will also suffice (see next bullets). Use this option when you want to allow the item to be set only by URLs having checksums that were generated by any user running the same application in the current workspace but in a different session.

    • Checksum Required: User Level - The item's session state may be set by passing the item name/value in a URL if a checksum specific to the workspace, application, and user is provided. A session-level checksum will also suffice (see next bullet). Use this option when you want to allow the item to be set only by URLs having checksums that were generated by the same named user, running the same application in the current workspace but in a different session.

    • Checksum Required: Session Level - The item's session state may be set by passing the item name/value in a URL if a checksum specific to the current session is provided. Use this option when you want to allow this item to be set only by URLs having checksums that were generated in the current session.

  7. For Configuration, Build Option - Select a build option for this component. Build options are predefined settings that determine whether components within an application are enabled.
  8. In Comments, enter any notes regarding this item.
  9. Click Create Application Item.

16.5.2 Viewing Application Item Usage

You can view a list of where application items are used by clicking the Utilization tab at the top of the Application Items page.

To view the Utilization report:

  1. Navigate to the Shared Components page:
    1. On the Workspace home page, click App Builder.
    2. Select an application.
    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Application Logic, select Application Items.

    The Application Items page appears.

  3. Click the Utilization tab at the top of the page.

16.5.3 Editing Application-Level Item Attributes

Once you create an application-level item, you can edit it on the Create/Edit Application Item page.

To edit application-level item attributes:

  1. Navigate to the Shared Components page:
    1. On the Workspace home page, click App Builder.
    2. Select an application.
    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Application Logic, select Application Items.

    The Application Items page appears.

  3. Select an application item.

    The Create/Edit page appears.

  4. Edit the attributes.

    To learn more about an attribute, see field-level Help

  5. Click Apply Changes.

16.5.4 About Creating an Application-Level Item that Functions as a Global Variable

Large applications are often separated into several physical applications that reside in the same workspace. These applications often share session state by configuring the same cookie name in each application.

Another requirement of this type of architecture is the need to share a few global variables. While the number global variables should be kept small, global variables function as an effective means to facilitate communicate between the applications. For example:

  • Properties of the current user (such as email address, employee number, and so on).

  • Current company in a multitenant application.

You can create a global variable by creating an application-level item with the same name across all applications and setting the scope to Global.

To create an application-level item that functions as a global variable:

  1. Create an application-level item with the same name in each application to share session state.

  2. For Scope, select Global.

  3. For Security, Session State Protection, select Restricted.