The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Populate Request Form Field from Catalog Variable

james_walters
Giga Contributor

Hi

I need to populate the Request form Priority field based on the Priority the requester selects. I have added the field as a variable and onto the form, however I cannot get it to populate based on the selection I made on the catalog item.

I have tried a Catalog Item Client Script onSubmit but then it only takes that field. I tried a onLoad Client Script on the sc_request table but fails to update the field.

I've also tried a Record Producer and mapping the fields together, however that doesn't follow the same Cart format I need from the other catalog items I have.

Looking on the community the catalog_item UI Macro could help but I'm not confident to update.

Any help please? A lot of posts but not specifically setting a form field based on a variable.

Thanks

James

1 ACCEPTED SOLUTION

Hi



I've created a new workflow for this item and running a script during the workflow to populate the Priority.



var p = current.variables.priority;


var request = current.request.getRefRecord();
request.priority = p;
request.update();



This worked for me. Thanks for your help.



James


View solution in original post

10 REPLIES 10

Hi



I've created a new workflow for this item and running a script during the workflow to populate the Priority.



var p = current.variables.priority;


var request = current.request.getRefRecord();
request.priority = p;
request.update();



This worked for me. Thanks for your help.



James