- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 11:15 AM
Hi everyone!
I need help with flow and I couldn't figure out the solution.
I created a new catalog form and the form contains the following fields:
1. Dock # - This is a single line text. Visible on portal. Will ask users to input dock#
2. WEB URL - Also a single line text, hidden on portal but visible on the back-end. With pre-populated url.
What I need to do is, if user inputs a dock# on the portal, the dock# will be added on the WEB URL field (with pre-populated url). Please refer to the image below:
I need to do this by using a flow design and without any scripting. Is it possible? Please help. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 01:40 PM
Hello @jeffreygard1127
You can create a custom action and pass the RITM record into it like how I did in below screenshot and update the variable based on the value of the dock.
(function execute(inputs, outputs) {
// ... code ...
var grRITM = new GlideRecord("sc_req_item");
if(grRITM.get(inputs.ritm)){
if(!gs.nil(grRITM.variables.dock)){
grRITM.variables.url = "https://www.google.com" + grRITM.variables.dock.toString();
grRITM.update();
}
}
})(inputs, outputs);
(=tested)
Let me know if you stuck anywhere
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 01:40 PM
Hello @jeffreygard1127
You can create a custom action and pass the RITM record into it like how I did in below screenshot and update the variable based on the value of the dock.
(function execute(inputs, outputs) {
// ... code ...
var grRITM = new GlideRecord("sc_req_item");
if(grRITM.get(inputs.ritm)){
if(!gs.nil(grRITM.variables.dock)){
grRITM.variables.url = "https://www.google.com" + grRITM.variables.dock.toString();
grRITM.update();
}
}
})(inputs, outputs);
(=tested)
Let me know if you stuck anywhere
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 03:04 PM - edited 11-12-2024 07:30 AM
Hi @Murthy Ch, thank you for answering my question. I'm new to ServiceNow and still not very familiar with flow design but may I ask what this is and how can I create this? I'm following your solution but I'm stuck on this part. Also, I forgot to mention that this should reflect on the SCTASK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 06:30 PM
Hello @jeffreygard1127
It's an input which we will add in the action, so you can add RITM table as a reference in input and callback this in script step. So, you can use that in script.
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 08:32 AM
Thank you so much Sir @Murthy Ch your solution works.