Is it possible to auto-populate a single line text using flow design?

jeffreygard1127
Tera Contributor

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.

AUTO POPULATE.png

1 ACCEPTED SOLUTION

Murthy Ch
Giga Sage

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.

MurthyCh_0-1731361108694.png

MurthyCh_1-1731361164116.png

(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

Thanks,
Murthy

View solution in original post

8 REPLIES 8

AbdulNow
Tera Guru

@jeffreygard1127 , I hope you are doing well! This requirement necessitates scripting, requiring at least a few lines of code, either in Flow Designer, client scripts, or UI policies. Achieving this functionality is not possible without scripting. Thank you!

 

If my response was helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports my efforts but also benefits the community.

Hello Sir @AbdulNow. Noted on this. Appreciate your input and will take note of this.

Amit Verma
Kilo Patron
Kilo Patron

Hi @jeffreygard1127 

 

Please refer below steps to achieve this without code -

 

1. Create a flow with trigger type as Service Catalog :

AmitVerma_0-1731389963599.png

 

2. Under the actions section, make use of Lookup Record action on "sc_item_option_mtom" table. Replace webUrl with your catalog item question variable.

AmitVerma_1-1731390064772.png

 

3. Again make use of Lookup Record action but this time on sc_item_option table to get the ritm variable for weburl.

AmitVerma_2-1731390117696.png

 

4. Make use of Update Record action to update the RITM variable value :

AmitVerma_3-1731390253625.png

Output -

AmitVerma_4-1731390319206.png

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi Sir @Amit Verma appreciate your help on this one, however, the 1st solution is now working on my end. I will mark your answer as helpful. Thank you so much.