Skip to main content
Question

Find solution to single out value from description with indexof until new line (\r\n)

  • 27 June 2024
  • 0 replies
  • 28 views

Hi,

I’ve build a solution for a customer with help of workflow automations (WFA) in Freshservice. The WFA is parsing text from the description field and it’s purpose it to single out a username after the key word “Bruker: “

 

I have an working solution that uses substring and index of expression fucntions in conjunction. The customer now wonders if it’s possible to take the user name from the first key word to a line break (\r\n). I’ve tested the below but it doesn’t seem to solve it for me. Can Freshservice distinguish line breaks or do I need to use regexmatch. Anyone have any examples for this?

substring('{{ticket.description}}', (indexOf('{{ticket.description}}','Bruker: ', 0)+8), indexOf('{{ticket.description}}','\r\n',0))

 

The above is supposed to take efterthing from “Bruker: “ to the first line break, but it doesn’t work and throws this error message:

/Erik Alm

 

 

Output - Operator 'substring' : Third operand's value must be > second operand's value.

0 replies

Join the Community or User Group to Participate in this Discussion

Reply