Jump to content
  • Persistent Variables - 3.2 - Store a value

    Persistent Variables - 3.2 - Store a value

    VBScript

     

    As already mentioned using persistent variables is very straight forward, just like you use common VBScript variables.

     

    The only difference is, that the value you put into a persistent variable will automatically be store into the database.

     

    Dim Announcement
    Set Announcement   = new PersistentVariable
    Announcement.Name  = "Welcome"
    
    Announcement.Value = "Default Welcome.wav"

     

    The content you want to store into a persistent variable needs to be put into the Value property.

     

    You can put anything you want into the persistent variables, like strings, booleans, integers or dates. You only need to keep in mind that the maximum size is limited to 1kB (1024 bytes).

     

     

    If the above code is used in a call routing of a user, the variable will be visible/accessible for the current script user only (the User scope is the default scope in this case).

     

    If the above code is used in a call routing of a group, the variable will be visible/accessible for the current script group only (the Group scope is the default scope) in this case.

     

    To configure another scope you have to change the Scope property.

     

     

    You will find the 3.4 - Simple Script - Store Variable in the download package which includes the above code.

     

     


    Tom Wellige
     Share


     Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.