• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Setting Global AppVars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting Global AppVars

    Is there any way to be able to set global appvars that are available to all apps in an environment? I'm thinking of something like setting, say, a company code that will be used to filter data in every app. Something similar to the startup program in an app, but at user level.

  • #2
    If you set a session variable via the login exit program (for example, to store a company code), then use the same name for the session variable in vvIn_Virtual, it will retrieve the value from the session variable

    Example for State Code
    Code:
    vvUtility_saveSessVar('usStateCode':stateCd);
    SQL Data Source - Using State Code
    Code:
    SELECT
      cusno,
      cname
    FROM
      democmast
    WHERE
      (
        cstate = vvin_virtual('usStateCode', 'CA', 'char', 2, NULL, 'true')
      )

    Comment

    Working...
    X