3 Replies Latest reply on Oct 24, 2017 5:39 AM by antonis.athanasiou

    Custom Query Macros/Variables available


      Hi All,


      I have been enjoying the Custom Query resource with its native capabilities on filtering (Search box) and enhancements like icons and links ( [_IconFor_Column Name] [_LinkFor_Column Name] for anyone's reference )

      It is also very beneficial on detailed views where filters can be applied in the WHERE clause ( WHERE NodeID=${NodeID} )


      Recently we tried to build a custom SWQL query resource for one of our VM Details view, however the statement WHERE VirtualMachineID=${VirtualMachineID} just wont work (displays all VMs)


      Is there a reference which macros can be parsed in the Custom Query resource ? I searched on GitHub but no luck. hopefully tdanner can assist




      Antonis Athanasiou

      Prosperon - UK SolarWinds Partners

      Installation | Consultancy | Training | Licenses


        • Re: Custom Query Macros/Variables available

          I'm not aware of any reference for these macros. I had to go look at the code for the VM Details view type to see what was available: not much. It looks like you just get NetObjectID and the Caption.


          I sent a message to the relevant dev team and will add an update here if they tell me something different.

            • Re: Custom Query Macros/Variables available

              But on the plus side, netobjectid is effectively just as good as virtualmachineid for this use case.


              I feel like this kind of request to know what variables each page can output is becoming more and more common as the user base becomes more skilled in building custom SWQL resources.  Might be a worthwhile effort to try and compile some kind of documentation on what people can pull from the pages, or at least a methodology for how users can find out themselves without just guessing and checking against all the variables we hope for.

              • Re: Custom Query Macros/Variables available

                NetObjectID is actually a great asset to work with!


                Did you manage to get it working on a custom query? both ${NetObjectID} and ${Caption} are giving me the infamous 'Error: A query to the SolarWinds Information Service failed.'


                SWISv3 logs "ErrorMessage = SolarWinds.Data.Query.ParserException: Cannot resolve property NetObjectID"