Forum Discussion

agoralewski's avatar
agoralewski
Community Manager
3 years ago

Fact or Fiction? I can use global variables

Statement:

I can use global variables.

Question Credit:  Peter Fugere

Is this statement fact or fiction? Comment your best guess below! Answers will be revealed in one week.

 

* This question is applicable to Platform 7.3.0 and may not be relevant to future releases

 

  • TimVierhout's avatar
    TimVierhout
    New Contributor III

    Fact. Every business rule has a global object where you can store global variables.

  • t_kaplanis's avatar
    t_kaplanis
    New Contributor II

    Fact. Can be done in the following way:

    Dim MyVariable As Integer = 5 (Can be done with other datatypes such as "String")

    Globals.SetObject("DesiredGlobalVariableNameHere", MyVariable)

    Globals.GetObject("DesiredGlobalVariableNameHere")

  • Tim is correct, but you must enable the global functions under properties

     

     

    • ChristianW's avatar
      ChristianW
      Valued Contributor

      This setting allows you to reference the business rule in a member formula. The globals object is always enabled.

  • Sara_EFR's avatar
    Sara_EFR
    New Contributor

    Fact... I think...

    Change the settings under Variables?

    #newbie