Shared variables in oracle apex

1k Views Asked by At

I am a beginner to Oracle Apex and I am using version 19.1.

How do I create/use shared variables? I want to set/access them through different pages. I am not able to figure this out since everything is provided with an interface and not much access to the low level JavaScript code.

2

There are 2 best solutions below

1
On

Either

  • go to Shared Components and create them there (see upper left corner), or
  • create a Global Page (Page 0) and in there create items which can be used throughout the application
1
On

In one sense, both page items and application items can be thought of as "shared" in that their values can be accessed in SQL and PL/SQL from anywhere.

However, if you want to set/access the values of page items through multiple pages using JavaScript, you should put those page items on page 0. Page 0 is a special page that adds content to all pages, so use the appropriate conditions to add the items to only the pages you need.