Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Strange issue with Global Variables - Forms 12c

Hello,
I have recently taken up a project where forms written in 10g needs to be converted into 12c. When looking at these forms, there is extensive use of these global variables.
One odd thing I see with these global variables is that they are not declared anywhere in these forms. Usually, we declare and assign a value to a global variable in WHEN-NEW-FORM-INSTANCE trigger.
Whereas this trigger (WNFI), shows no reference whatsoever for these Global variables.
Now , I am at a loss here, these Global variables are used every where in these forms, but they simply do not exist in WNFI where they should have been declared and assigned a value in the first place.
Where else these Global variables could be getting it's value or would have been declared? Any idea?
Thank you,
Darsh
Answers
-
You can have global variables anywhere in your application. The only criteria is that you initialize them upon creating them. In other words, you must give it a value the first time you call it. You can't just do :global.foo := X. The first time it is called, a value must be assigned to it. So something like :global.foo := 0 After that you can do whatever is needed.
-
Hi Michael,
Exactly. To quote your example to describe my issue further:
In these forms, I see following everywhere
a_variable := :global.foo;
b_variable := :global.foo;
c_variable := :global.foo;
But I do not see this anywhere at all.
:global.foo := 0;
Thanks,
Darsh
-
Good Morning everyone
I´m using Oracle forms 12.2.1.4
Question: What is best (in performance terms): use GLOBAL variables or Package variables ?
Thanks in advance...
-
@User_G4WFE Please do not hijack the thread. If you have a question about using Forms Global variables, create a new post.
-
Good afternoon
I´m so sorry... I will not happen again...