- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 12:02 AM
if there are multiple catalog items with same wf but every time description field is getting changed so in run script activity how can we set it dynamically
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 02:55 AM
Hi,
As I mentioned please don't use current.update()
Now are you using correct sys_id and correct variable name there i.e. variablename1
Did you check that variable value is empty or not
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 12:37 AM
Update as:
desc();
function desc() {
if (current.cat_item == 'sys id of catalog item') {
current.description = current.variables.variablename1.toString();
}
else if (current.cat_item == 'another sys id'){
current.description = current.variables.variablename2.toString();
}
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 12:47 AM
Hi,
Follow point from Aman and no need for answer variable
Also there is no need of current.update() if you are using this in run script of your workflow of catalog item
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 01:04 AM
ankur, aman i tried above steps not working in my case i tried by using catalog sys id as well as catalog name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 02:15 AM
can you share the screenshot of your workflow once!!
and by the time add logs and check if possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2021 02:36 AM
Hi,
If you are using that script in workflow run script of your catalog item then it would work provided you give correct sys_id or correct catalog item name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader