The web blog strives to be a comprehensive guide to SCCD, TADDM, SERVICE NOW and MAXIMO tools. This is a personal site maintained solely by me. I intend to update it regularly.For live updates please follow us on.

Automation Script- Find 16 Digit numbers from long description

Find 16 Digit numbers from long description

Set the escalation to read the script. The script takes input from Long Description of SR, find the 16 digit numbers from that string with mentioned pattern and then set that numbers to summary(in SR application).

1. Created Script with Action Launch Point having two variables (IN, OUT).

Script Code
# Find 16 Digit numbers from Long Description and Set all 16 Digit Numbers in Summary
from java.lang import Runtime
from java.util.regex import Matcher
from java.util.regex import Pattern
# Find the patterns of 16 Digit numbers from String and Set that 16 digit numbers into summary

pp1 = Pattern.compile("((\d{4})-(\d{4})-(\d{4})-(\d{4}))|((\d{4}) (\d{4}) (\d{4}) (\d{4}))|(\\b\\d{16}\\b)" )
m1= pp1.matcher(longdesc)
 longdesc1=longdesc1+" "
1   2. Created Escalation 1038 with SEPARATE action.


Before script triggering (SR Number: 1142)

After Script triggering:
Script triggered through escalation. The Summary field set the with 16 digit Numbers.