Need to update the location based on the Short description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 04:24 AM
we have short description like [S1871R02] and we need to update the 1871 into the location field in incident.
we wrote script already but when we try to update the incident location is not matching with short description.
Business Rule script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 05:39 AM
So using my version of the script you are seeing "Location found:" in the log, but that's all it says - no Location Name following, or are you not even seeing "Location found:" in the log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 05:47 AM - edited 10-03-2023 06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 07:48 AM
That makes more sense. So back it up a step - are you seeing the "numericPart:" log, and if so, so the value preceded by 'M' match the name of a Location record? If you are not seeing this log, what is the value in the "numericPartMatch:" log? Since you are using the second member of this value in to assign to numeric part, change the numericPartMatch log to confirm the value of [1]
gs.info("numericPartMatch: " + numericPartMatch + " numericPartMatch[1]: " + numericPartMatch[1]);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 07:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 08:09 AM
That's progress. Do you have a Location record with a Name = M0516?