Jump to content

Documentation for custom fields


Inevat - Michael Jones

Recommended Posts

We have requested this from the support team with 0 response (seems to be a common issue). We need documentation for the custom data. How do we display it, set it, etc. We would like to be able to pull information from the system via script and output to the custom field, but cannot find any documentation on how to do it.

Link to comment
Share on other sites

  • 2 weeks later...

There is a guide here: https://intercom.help/pulseway/en/articles/4384286-introduction-to-custom-fields

but it's not at all clear how the fields are supposed to work as there are no specific examples to follow. Are we supposed to echo the data we want to store in the field?

For example, I have a script which installs PStools and accepts the EULA for psexec. I'd like to store the result of where the PSTools directory is located (which may be C:\Tools\PSTools or D:\Tools\PSTools) so I can use it in my script to run cleanmgr but can't see how to.

Setting the path system variable doesn't appear to work (but that's another topic) so I have resorted to hard-coding the path into subsequent scripts :huh:

@Gabor is the author - can you add some more detail into the guide please?

Link to comment
Share on other sites

27 minutes ago, Piers said:

There is a guide here: https://intercom.help/pulseway/en/articles/4384286-introduction-to-custom-fields

but it's not at all clear how the fields are supposed to work as there are no specific examples to follow. Are we supposed to echo the data we want to store in the field?

For example, I have a script which installs PStools and accepts the EULA for psexec. I'd like to store the result of where the PSTools directory is located (which may be C:\Tools\PSTools or D:\Tools\PSTools) so I can use it in my script to run cleanmgr but can't see how to.

Setting the path system variable doesn't appear to work (but that's another topic) so I have resorted to hard-coding the path into subsequent scripts :huh:

@Gabor is the author - can you add some more detail into the guide please?

Hi,

This would be a quick way of doing it, as an example:

image.thumb.png.24fb89aa0613009851c4869289dab195.png

I'll edit the article asap with a better explanation when I can.

Thank you for pointing this out, I appreciate your comment on this matter! :)

 

Link to comment
Share on other sites

This may not be entirely related, but I'd like the possibility to insert hostname in the email-notification that can be sent in an automation workflow.. Currently there is no easy way of knowing which computer the workflow was triggered on, except scrolling through the workflow history which might be a tedious task. 

 

I guess this could be achieved if we were able to insert custom fields like %pulseway.hostname% or whatever.

Link to comment
Share on other sites

  • 2 months later...

@Gabor Did you purposefully insert the code as an image, so we couldn't copy and paste it to reuse in your scripts? Retyping the whole thing can lead to mistakes and the script not executing correctly.

Also, the article needs more practical examples on how to use the Custom Fields and the Custom Variables. I would like to do a check if an app is installed , update a Custom Variable and then use it in a Custom Field. It is really unclear at this point. 

Link to comment
Share on other sites

  • 1 year later...

I'm also learning about custom fields and I think it finally clicked for me. I want to share this to help anyone else struggling with this.

I used this guide to set up custom fields and to find out how to connect them to a script. While this guide in itself may not apply exactly with what you're looking to accomplish, use it as a template as it lays a good foundation on the process.

Simply put, you create the custom fields in Automation > Custom Fields. Then create (or edit) your script (Automation > Scripts) and add in those custom fields as Outputs. It's important to note that the name of the Output needs to match whatever variable name (in the script) that you want to extract the information from - this is something I will later correct in the comments on the other thread as it was written incorrectly in the guide.

So, running through the script I'm presenting as the example - the script checks on the BitLocker status/keys and then puts that data into the script's variables, which passes that info to the Outputted custom fields, which will then save those in the custom fields under Systems > Systems > (individual system name) > Custom Fields.

---

Edit: One more quick note on a discovery which I haven't seen documented anywhere - You don't have to manually assign custom fields to any systems (at least with the custom fields with the "System" context). Once you run a script that has a custom field as an output, it will automatically assign that custom field to the system under Systems > Systems > (individual system name) > Custom Fields. Hopefully that saves someone some time.

Edited by Fred_BD
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...