The CreatorCon Call for Content is officially open! Get started here.

dynamic field on catalog item through Virtual Agent

balochfarha
Giga Contributor

I made a topic Titled : (i need monitor ) in VA which Fetches Catalog Item ( Monitor  ) Now I want to set the description dynamically same as my prompt.Screenshot (47).png 

10 REPLIES 10

@balochfarha Those are fields on RITM table or variables in your catalog item


Raghav
MVP 2023
LinkedIn

Variables on catalog item

 

@balochfarha I spent some time on this in my PDI and found the solution.

The custom input control returns the object which has the sys_id of RITM , so you can add another script utility after the custom input control with below script.

 

(function execute() {
   var reqInfo = JSON.parse(vaInputs.responsefromcomponent);
   var sysID = reqInfo.requestId;

   var req = new GlideRecord('sc_req_item');
   req.get(sysID);
   req.variables.description = "test from VA"; // add your description
   req.update();
})()

 

Note : Once you open the request item, after it is submitted you will see the variable populated.
Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

@balochfarha Did you get a chance to view the solution?


Raghav
MVP 2023
LinkedIn

@balochfarha did you try this?


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn