How to get the value from the field and store in the variable

suuriya
Tera Contributor

Hi Community,

 

Im trying to get the value from the field and store it in the variable and reuse that variable in the script.

 

Basically, In sys_email table there is field called body text i want that value to be use in the description of the incident which is creating by this BR (written on sys_email table)....i tried something like email.body_text but didnt worked...so taught of gliding sys_email table and using encodedquery.

suuriya_0-1703158747219.png

 

suuriya_2-1703158807680.png

Idea of this BR is based on specific conditions incident record need to be created...which is working fine i did that but im struck with the description part.

suuriya_3-1703159251640.png

Please provide any insights on this...how we can get the value of body text from the recieved-ignored email and use it in the description field of the incident.

 

Note : This needs to be achieved by Br or something but not with inbound email actions because incident needs to be created when emails are received-ignored type.

 

Thanks in advance

9 REPLIES 9

VaishnaviShinde
Kilo Sage

Hello @suuriya ,

 

In the BR image on the line 8 replace current.email.body_text to current.body_text. 

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

Hi @VaishnaviShinde ,

 

Thanks it works!!!

 

Need one more help in the email body there will be server name mentioned that name needs to be populate in configuration item field in incident which is reference field.

 

How we can achieve this...written something like this but didn't worked

suuriya_0-1703162361886.png

in email server name mentioned like this

suuriya_1-1703162466443.png

Thanks in Advance

Hello @suuriya ,

 

The server name which present in email is present in cmdb_ci table ?  
If yes then first glide the cmdb_ci table and add query like (“name”, server name present in body) and then add inc.cmdb_ci = sys_id of that server.

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

 

Hi @VaishnaviShinde ,

 

Tried something like this but in incident it is setting empty value

suuriya_0-1703243996547.png