calling the system properties in flow designer inputs

LaraReddy
Tera Guru

Hi All,

We have created Two "String" system properties.

In flow designer we created Two input variables.

And now we want to call those Two properties in flow designer and get the outputs.

Can anyone please help us here.

Advance thanks.

14 REPLIES 14

Hello Lara,

 

In that case, why do you want to create input variables? Input variables are used when you are passing something to the action. I am not fully sure about yoru requirement, you might ahve to tell complete requierment here.

 

If you want to get the values inside the action, then you dont need the input variables. What you need is output varaibles to pass the data from actions to something else. Input variables in action are meant that while calling action, you pass the varailbles to the action which are stored in input variables.

 

In your case, you need output varialbles, if you want to send the sys property data back to the flow.

 

In that case, just click on  + icon below the inputs on the left side and then select script step and write code to fetch sysproprties values and then store them in the output.

Refer to below screenshots.

1683109546966.png 

 

 

1683109588894.png

Now you can call this action in yoru flow and can use those sysproperty valeus or do further actions on this.

 

 

 

 

Hi @LaraReddy 

You can simply use gs.getProperty() to call the system properties in the Script step of Action. 

Pravindra1_0-1683110444151.png

 

Good day,

Not sure if this has been resolved, but I have a solution here. You can use the following example to query the system property from a script step inside the action. 

 

(function execute(inputs, outputs) {

  outputs.propertyneeded = gs.getProperty('systemproperty.name');

})(inputs, outputs);

 

make sure to have outputs with the same names in your output variables for that step. 

Community Alums
Not applicable

Hello @LaraReddy ,


You can use this script in the data field of set variable value

var value = '';
var
gr = new GlideRecord('sys_properties');

gr.addQuery('name', 'your_property_name');
gr.query();

if(gr.next()){
    value = gr.value;
}
return value;

 Use set flow variables logic to set the variables

AnandMahajan_0-1683103627172.png

 

 

Regards

Anand

Hi Anand,
Many thanks for the response.

We're not able to find the mentioned set flow variable action, 

Actually we are created one flow "Actions" and in the Actions level Two Inputs are available and now we want to get the Two system property values to above mentioned inputs.

LaraReddy_0-1683105211336.png

Advance thanks.