Why script is not updating status?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 12:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 02:22 AM
Hi Maik
Script is working fine and updating the status field now. But I have to search or filter records based upon two factors I have to search name of record with trend word. For example "This is a credit loss." is record's name (nm variable value) and trend word is credit loss. Based upon trend word it will give "This is a credit loss" as result .This can be achieved with like operator. But what if we have to do reverse based upon record's name "This is a credit loss" need to find trend word "credit loss". How this can be achieved?
If we write gr.addQuery(trendname like Records name) something like this . This wouldn't work as trend word is just a part of record's name.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 01:57 AM
Hi there,
What debugging did you already do and what valuable information from that can you share with us? Is the script being triggered at all? Is it working up to a certain point? From where is it failing? How are you testing? Etcetera.
Getting more info from you will save us and yourself a good chunk of time, and we might be able to help you more correctly.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 02:16 AM - edited 09-01-2023 02:21 AM
Hi Mark,
Script is working fine and updating the status field now. But I have to search or filter records based upon two factors I have to search name of record with trend word. For example "This is a credit loss." is record's name (nm variable value) and trend word is credit loss. Based upon trend word it will give "This is a credit loss" as result .This can be achieved with like operator. But what if we have to do reverse based upon record's name "This is a credit loss" need to find trend word "credit loss". How this can be achieved?
If we write gr.addQuery(trendname like Records name) something like this . This wouldn't work as trend word is just a part of record's name.