- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2014 04:40 AM
Has anyone got around this issue...
A user adds multiple items to their cart in ESS - the 'Requested for' field for each item is set different (e.g. a PA logging two tickets for members in her team).
The REQ and all RITMs log with the 'Requested for' as the last customer to be set.
What we ideally need is for each item to take the relevant customer name and apply that to the 'Requested for' field in each RITM logged (and not just apply the name from the last item to all other items ordered).
We are not overly concerned with what name gets populated in the parent REQ record for the 'Requested for' - ideally, if there is one item in a REQ it would take the 'Requested for' name entered and if there are multiple items per order it would take the 'Opened by'.
The response from Hi is...
I understand your requirement here. But thats an expected behaviour. This is because the 'Requested For' field is on the 'sc_request' table. Whenever an user submits a cart with many catalog items, it always creates one Request and multiple Requested Items. So, there will only one 'Requested For' and so it takes the Requested For as the last person whom you add it as Requested For in the Cart. There is no alternative for this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2014 05:52 AM
oopsy I should i mentioned it properly ...
current.yournewfield = current.variables.variableNameFromCatalog;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2015 03:32 AM
Are you using the "Requested For" variable to override the "Requested For" field on RITEM ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2014 04:23 AM
Thanks. I thought this might be the answer.
I've created the new field and am amending the variable to point to this.
Within the existing variable I have catalog client script...
Should I be updating this (updateRequestedFor) to be pointing to the new field? I cannot work out how to do so.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2014 04:47 AM
first placed the variable in the catalog ... have a onsubmit or onload script to fill the value in the variable.. Later add a before insert business rule on the requested item table...
script :
current.yournewfield = current.variables.updateRequestedFor;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2014 05:46 AM
I'm not sure the last part is working. I've put the script in as...
current.u_requested_for = current.variables.updateRequestedFor;
The first part is the new 'requested for' field that I've created on the RITM form.
What is the last 'current.variables.updateRequestedFor' referring to?
I can now see in the variable section showing on the RITM form that the 'variable' question is showing as the customer chosen.
I just need this to populate the 'u_requested_for' field on the RITM form itself.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2014 05:52 AM
oopsy I should i mentioned it properly ...
current.yournewfield = current.variables.variableNameFromCatalog;