I get a lot of issues generated from my customers datacenters. The issue description contains a table with information that I want to enter in custom fields with automation.
The table can look something like this
Alert Type: | Device Alarm |
|
Severity: | Critical |
|
Alert Level: | NewYork-Email-notification |
|
Device: | ESU-RQ7 (101.159.160.183) |
|
Is it possible to fetch through Regex?
Hi @Olof Nysten welcome on the community. Can you describe the whole proces in more detail?
Issues are created automatically with description which contains table? How do you want to process it?
Thank you.
The issues are created from incoming e-mails. These e-mails contains a table with all the information I need for custom fields. These field are then used in integrations with other systems.
As there are hundreds of issues created, it would be great if I can create an automation that fills the custom fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Olof Nysten , thank you for the information. Give me few days, I will try to play with it a little... I'm quite curious :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Olof Nysten I think I almost have it :).
I prepared issue with a table:
And I prepared an automation with following setup:
I logged my description to find out what is its format and it was:
|greeting|Hello| |name|Martin| |last name|Bayer|
I hope it will help... :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! That was exactly it. I have experimented with expressions like that but never found the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cool, you are welcome :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry duplicate response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Martin Bayer _MoroSystems_ s_r_o__ I have a similar situation but I am just not able to grab the data, my table looks like this:
I need to grab the data that is highlighted so my text looks like this:
{{issue.description.match(".*|Requestor Employee Type|(\S+)|.*")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Olof Nysten this worked great for horizontal matches, thank you!
I'm using the match function to return numeric values associated to a given month/quarter/year:
|Month|Total|
|Jan|1|Feb|2|Mar|3|
etc.
A couple questions:
#1
Using the regex noted for horizontal matching, I sum the number associated to each month in the table into a custom field for the respective Q1 total (e.g. Q1= matches for Jan + Feb + Mar, and so on). When I add Jan, Feb, Mar using regex match, the Q1 total shows up fine. :tada:
In the same automation string, I need to sum the now updated quarterly total fields into an Annual Total. I tried this two ways:
In both cases the Annual total field won't update unless I re-edit the description field, so there seems to be an "edit" trigger lag.
#2
Depending on the layout of data in a table, is it possible to perform a vertical match instead of the horizontal solution you provided? Aka instead of using match to pull data to the right, is it possible to pull the data below?
A preferred table layout would be:
|Jan|Feb|Mar|Apr|May|Jun|
|1|2|3|4|5|6|
|Jul|Aug|Sep|Oct|Nov|Dec|
| | | | | | |
For a given month, the result is to pull the number entered below it into a custom field once the Description field is edited/updated; using the example the desired return would be "1" when matching for "Jan" or "5" when matching for "May"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.