Global variable do not work

Hi,
I create a global variable called gMENU in one database, but it is not recognized in an other database. It seems the global variable do not work.
Could anybody help me ? Thank you !

I don’t use global variables very often, but I just tried it, and it worked for me.

We are going to need more specific information. How did you declare it? What initial value did you give it? What were you trying to do with it when it failed? Is it just the other database that doesn’t recognize it, or does the database where you created it not recognize it either?

Thank you for answering me !
I crated this global variable in a database called “MercureX” like this : Global gMENU.
gMENU=info(“databasename”)
It appears correctly in this database in a text display object.
In an other database also open called “CabContacts” : "Field or variable gMENU does not exist. This database is opened with a procedure in “MercureX”.

If the form in CabContacts was opened before the global variable was declared, that error might simply be a holdover from when the variable actually didn’t exist.

ShowVariables gMenu

might be all that is needed to make it display the value.

CabContacts opens after declaration of global variables. ShowVariables gMENU doesn’t change anything.

The only thing I can think of in that case, is a discrepancy in the spelling.

I verified many times the spelling. I quitted many times Panorama and relaunch it. But nothing changes.
Thank you

Try running message info("globalvariables") to see if it shows up in the list. Other than what Dave has already suggested I can only think one other way it would not show up in the second database and that is if you inadvertently declared it a fileglobal instead of a global variable.

Thank you Gary for your answer.
It is correctly declared as global.
The info(“globalvariables”) shows the global variable gMENU but, on the same form in the text display object “Field or variable gMENU does not exist”

What if you create a second text display object with gMENU as the formula?

Same result…

In the problem form create a simple push button object with just “message gMenu” in the procedure panel. What happens when you press this button in data mode?

“Field or variable gMENU does not exist !”

Sorry ! The message is “Content of variable gMENU has not been defined.” although it is correctly defined in the first database MercureX

That would imply that you have a gMENU fileglobal variable. It could have been declared automatically by a form object, such as a text editor object. The value is being assigned to the fileglobal and the global is left without any content.

Interesting ! I will check… Thanks

The Variable Vue gives gMENU as a file global !

I changed the name of the gMENU and now it works.
Thank you very much !