Kaseya Community

load multiple values from text file into custom fields

  • Hi folks,

    I am here to seek for your help to implement the following inside agent procedure.

    I have a text file somewhere on the monitored machine looking like this:







    or about 20+ rows

    I am looking for a script to load this data into custom defined fields with exactly the same names as the ones in the text file. Possible values for each custom fields is either 0 or 1 if that makes any difference at all.

    Any help how to implement this into an agent procedure script would be highly appreciated.

    Thank you!

  • The only way I have ever managed this is to take the all the text which must have a delimiter character added and all the text must be a s single line


    custom_field_1:value | custom_field_2:value | custom_field_3:value

    Then I take the string and pass it to a SQL query that splits the values into 3 separate ones and saves as procedure variables then allowing mew to write each variable to a different custom field

    BUT I have only done this with a max of 3 varaibles

  • The audit tool in our Core Automation Suite does this - it reads txt, ini, registry, and other values into custom fields. Audit tool collects about 200 data points, then generates a "cache" file of the 40 items we upload from various locations, including the audit data.. You can query any value independently.