logo

NJP

Flow Designer Action "Get System Property"

Import · Apr 20, 2022 · article

Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

Hi there,

While working with Flow Designer, you will face situations where you would need to obtain a value from a System Property. Out-of-the-box though, there's no zero code Flow Action, or something similar.

Since this is not out-of-the-box, what can we come up with ourselves? There are multiple ways to go. For example, with the Quebec release Flow Variables got introduced which you might use for this in combination with small scripting. Or in some cases there's a toggleable Script field that you could use. In this article, I'll share a Flow Action which I have been using for more than two years now. You might argue if the Flow Action could be enhanced, using the Error Handler which has been introduced with the Rome release for example.

It's a small Flow Action to share, though seeing the customer and Now Community questions, a small Flow Designer piece which is asked often.

Get System Property

A well-known Server Side script method to get the value of a System Property, is gs.getProperty(). As mentioned, unfortunately out-of-the-box there's no zero code Flow Action or something similar to get the value of a System Property. Also not always there's a toggleable Script field available, where you could use gs.getProperty().

Flow Action

To achieve a zero code option to obtain value from a System Property, let's set up a Flow Action.

Inputs could be:

image

Outputs could be:

image

image

Using the inputs and outputs we've set up, the Script step could be something like the below, using the gs.getProperty() Server Side script method:

image

View original source

https://www.servicenow.com/community/developer-articles/flow-designer-action-quot-get-system-property-quot/ta-p/2322011