Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Returns a structure indicating whether a global reference is defined, whether it has data, and whether it has subscripts.

Arguments

None. The global reference is set when calling *open()* on the object instance created in *lib.cfmumps.global*.

Return Value

Returns a struct with the following boolean members:

  • hasData
  • hasSubscripts
  • defined

Example

 

Code Block
languagejs
titleCFScript
linenumberstrue
glob = createObject("component", "lib.cfmumps.global");
glob.open("myGlobal", ["key"]);
if(glob.defined().defined) {
  writeOutput("^myGlobal(""key"") is defined"); 
}

if(glob.defined().hasData) {
  writeOutput("^myGlobal(""key"") has data"); 
} 

if(glob.defined().hasSubscripts) {
  writeOutput("^myGlobal(""key"") has subscripts"); 
} 

glob.close(); 

...