- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 05:12 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 08:05 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 07:08 AM
What kind of thing are you building with? Is it naturally a Catalog Item, Record Producer, Order Guide, or Wizard?
I do this all the time in Catalog Items. Because you're reaching all the way up to request, you might need a runscript activity that looks something like this...
current.request.priority = current.variables.priority;
That assumes that the two fields track value EXACTLY the same way though. You might want to double check that.
Some other things for your consideration from a process perspective:
- What does "priority" actually mean on a Request? Are you actually assigning request records to people?
- What does "priority" actually mean if the users can select it themselves?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 07:10 AM
It's a Catalog Item, I tried a record producer but not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 07:12 AM
Catalog Items and Record Producers are built for two different purposes. I wouldn't try switching building blocks for the purpose of populating one field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 07:14 AM
Hi James,
Can you redirect to the demo instance where you are able to reproduce this so that we can take a look.