Concatenating Message Key with Extracted Drive Information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello All
I need help in concatenating data from two different event fields. In ServiceNow Event Management, I want to create a unique message key using:
- The original message key
- Drive information available in the Type field
However, I do not need the complete value from the Type field. I only need the drive information, which I have already extracted using a regular expression in the Event Field Mapping and stored as the alert tag t_application.
Could you advise on the best way to concatenate the original message key with the t_application value to generate a unique message key? Or Is there any better way I can combine two different value into on field?
Message Key: 73340755
t_application: D
New message key we are expecting: 73340755_D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Durgaprasad Joi ,
Yes, this can be done in the event rule, so you do not need to concatenate alert tags afterwards. Alert tags are created after the event is processed, so t_application cannot be used to build the message key.
Suggested approach:
- Open the event rule that matches these events (Event Management > Rules > Event Rules).
- In the Event Field Mapping, take the Type field and apply a regular expression to capture only the drive value.
- Map the result into the Message key field together with the original value, so the message key becomes the original message key, an underscore and the drive (for example 73340755_D).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Thanks for the response. I tried this method by mapping expression to 'Resource' Field. It did not work for me. I can try with 'Type' field and let you know the result.