- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 01:46 PM
Alright, this is a wee bit complicated, but I'll try to explain as clearly as I can!
The problem:
We go to our Service Catalog under the Self Service module.
We open an item called "AR Recoveries Request". This is a typical service request form.
Items on the request form include the "Requested By", "Requested For", "Deadline", "Long Description", and "Relevant Contract" fields. Notice the lack of a "Short Description" field.
A user fills out these fields and clicks "Order Now".
A Request (REQ) is created. Inside the Request is a Requested Item (RITM). Inside the Requested Item is a Catalog Task (SCTSK). So in here lies the problem.
The "Short Description" field inside of the Catalog Task is defaulting to "Service Request - AR Recoveries Request". This is true although a short description is never asked for during the entire request creation process.
What we need:
1.) We need this field to stop defaulting to "Service Request - AR Recoveries Request".
2.) We need this field to display the information that is entered into a "Short Description" field on the "AR Recoveries Request" form. You see where I previously mentioned the lack of a "Short Description" field on the "AR Recoveries Request" form? We plan to add one there that we would like to sync with the "Short Description" field on the Catalog Task page.
Hopefully that was somewhat clear!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 08:12 AM
Then in the existing task activity code, you can add a check. Something like this should do
if(current.cat_item.getDisplayValue()=="your specific item name"){
task.short_description=current.variables.<short description variable name>;
}
else{
task.short_description = "Service Request - " + current.cat_item.getDisplayValue();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 11:46 AM
If I wanted to add a Contract field to the AR Recoveries Request form and sync to a Contract field in the Catalog Task, could I place another line of code such as...
task.u_company_contract=current.variables.<contract variable name>;
Both of the Contract fields would be Reference fields. Is this possible?
Also, thank you so much for Short Description help. The fields sync perfectly!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 11:48 AM
Yes, that is correct. task.u_company_contract=current.variables.<contract variable name>; will get you there. Glad you got your question answered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 01:19 PM
I may need to start a new thread for this but I'll go ahead and see if I can get this resolved quickly. I added the line of code below to the workflow we've been working on in this thread.
task.u_company_contract=current.variables.<contract variable name>; (with the proper variables plugged in of course)
I then used the Form Layout function in the Catalog Task to add a String Small (40) field to the form called "Company Contract". The variable name was set to "u_company_contract". I then submitted a test AR Recoveries Request to see if it worked. Once I got over to the Catalog Task, I found that instead of the contract I chose on the request form being displayed in the Company Contract field, I got some jibberish that read "01e15c82245bf1008903dfb69f39f468". Any ideas as to what the problem might be?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 01:46 PM
It is giving you back the sys_id. Make the field on the catalog task as reference type instead of string, you should be good to go.