Kaseya Community

Using SQL variables more effectively

  • I wonder if anyone has made the SQL View Data variable feature work in their scripts. I've managed to get it to return the topmost entry in an array (let's say, vCurrApplicationInfo) but I can't figure out how to drill down and get the entry I actually want. Or am I barking up the entirely wrong tree?

    Much thanks if anyone can shed some light on this.


    Legacy Forum Name: Using SQL variables more effectively,
    Legacy Posted By Username: GreyDuck
  • If you look in help you will see what data you can pull in from 'vCurrApplicationInfo' and other views.

    For instance you would do:

    #vCurrApplicationInfo.ApplicationName#


    I have just spent some time on this and was alittle lost for awhile myself.


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rumptis
  • Aha! It's that ".ApplicationName" part which eluded me. (The help documents aren't really clear on that point.)

    Much thanks!


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: GreyDuck
  • You are very welcome.

    It's confusing and there seems to be some mistakes in the help. Like you can't use '/' in the variables like they have listed. Unless you are getting a variable and then thats how you do it.


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rumptis