calling the system properties in flow designer inputs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 01:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 02:46 AM
You can create a script step and write the following script
Other option is to create a Lookup record step to get the value
If this will solve your query, mark this as correct & helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 03:04 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 03:09 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 03:20 AM - edited ‎05-03-2023 03:21 AM
Hi Anand,
Please check out the steps once.
Inputs image below:
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:
Advance thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 03:24 AM
Looks Good
Change output to outputs.
You can test it using test button to validate the output.