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

Community Alums
Not applicable

You can create a script step and write the following script

AnandMahajan_0-1683107084086.png

 

Other option is to create a Lookup record step to get the value

AnandMahajan_1-1683107140882.png

 

If this will solve your query, mark this as correct & helpful.

HI  Anand,
Is there any way to get the Two system properties in one script action.
Currently we're getting one property right, to get another one do we need to create another script action ???

Thanks.

Community Alums
Not applicable

you can use the same script action and write the script in the same one.

use GlideRecord and get the other property, create two output variables and set the values to different properties values.

Hi Anand,

Please check out the steps once.

Inputs image below:

LaraReddy_1-1683109186970.png

 


Could you pls check the below script:

(function execute(inputs, outputs) {
// ... code ...

var value = '';
var gr = new GlideRecord('sys_properties');
gr.addQuery('name','default_ship_from_warehouse');
gr.query();
if(gr.next())
{
value = gr.value.toString();
}

var value1 = '';
var gr = new GlideRecord('sys_properties');
gr.addQuery('name','default_return_to_warehouse');
gr.query();
if(gr.next())
{
value1 = gr.value.toString();
}

output.from_ware_house = value;
output.return_ware_house = value1;
})(inputs, outputs);


And the output variable image below:

LaraReddy_0-1683109126862.png

 


Advance thanks.

Community Alums
Not applicable

Looks Good

Change output to outputs.

 

You can test it using test button to validate the output.