Parse a Number out of an Inbound Email Subject line and Populate a Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2022 03:19 PM
I am trying to parse a ticket number from an integrated system out of an email subject line and populate a custom ticket number field on the incident form with that number. Does anyone know how to do this? Thank you in advance!
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 05:24 AM
It there a way to do this in flow designer. i have a very similar item been trying to work with in flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 06:13 AM
Can you do this for this subject?
FYI: Termination for John Smith, 603677 (2025-01-10)
Trying to pull the name, employee number, and date into separate variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2022 01:07 PM - edited ‎10-13-2023 05:13 AM
You could also use RegExp to extract the ticket number:
var subject = 'Service Desk Ticket # [123456] - Created';
gs.debug(getTicketNumberFromSubject(subject));
function getTicketNumberFromSubject (subject) {
var match = subject.match(/^.*#\s*\[\s*(\d+)\s*\].*$/);
return match ? match.pop() : '';
}