Need to populate the variable value in RITM and ScTask worknotes.

Raji15
Tera Contributor

Hi, 

I have a variable named "Address" whatever user is entering into that field while submitting a form, the value should be displayed on the RIMT and ScTask worknotes. BR might not applicable since it will affect other Catalog items. Can it be done with flow (there was an existing workflow) updates or scripts? please put your comments on this...

Thank you.

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@Raji15 

Steps

1) Grab the variable using "Get Catalog Variables" flow action

AnkurBawiskar_2-1754655075395.png

 

2) use "Update Record" flow action to update RITM work notes

AnkurBawiskar_0-1754654720010.png

 

2) then set the work notes using data pill in the "Create Catalog Task" flow action

AnkurBawiskar_1-1754654988302.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi, thank you so much for the effort you put in.

Unfortunately, it's a workflow(existing) I'm working on the updates. Not allowed to change it to flow. 

PS: I should have made it clear in my question. 

 

thanks

@Raji15 

Then do this via business rules

1) before insert business rule on sc_task

Condition: current.request_item.cat_item.name == 'Your Item Name'

Script:

var ritm = current.request_item.getRefRecord();
current.work_notes = ritm.variables.variableName;

2) after insert BR on sc_req_item

Condition: current.cat_item.name == 'Your Item Name'

Script:

current.work_notes = current.variables.variableName;
current.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Raji15 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Since the BR will affect other catalog items, I'm not allowed to use that. I'm trying with catalog client scripts and workflow scripts. please help me if you could.

 

thank you