Kaseya Community

Cannot read custom field in procedure

  • Hi,

    I've created a couple of custom fields, which work well for creating views.  I am having trouble reading the data back from within a procedure.  Whenever I try using either vSystemInfoManual/Custom_Field_Name or vSystemInfoManual.Custom_Field_Name the procedure always fails.

    Error in agent logs is Get variable, with SQL query failed to return data in GetVariable task, SELECT Custom_Field_Name FROM vSystemInfoManual WHERE (Machine_GroupID="machineName")


    I've followed instructions below, and still no joy.  I hope I'm missing something simple!

    http://community.kaseya.com/xsp/f/28/p/12262/61188.aspx#61188

    http://community.kaseya.com/xsp/f/28/t/13434.aspx

  • ,

    Do your custom fields have data populated in them (for all machines where you're running the procedure)?  If the custom field is empty, you are likely to see the error you're reporting.  Try entering info (anything) into the custom field for one agent and then test whether the procedure is successful against that agent.

    It may help others to offer suggestions if you can provide a sample of your procedure.

  • Combined.png

    Thanks for the reply Brande.  Yes, the fields do have data - see screenshots or the agent proc, and the corresponding field under Audit/SystemInfo.  That's why I'm so confused - nobody else seems to have these issues?

  • custfields.PNG

    Here's a screen shot of how I use the command

    Make sure you include the if check exists step as it ensure the script doesn't fail if there is no data