Hello everyone
I have this expression and I can’t get it to work
if(regexMatch('{{ticket.description_text}}','Bifoga') && regexMatch('{{ticket.description_text}}','Övrig'),
substring('{{ticket.description_text}}', indexOf('{{ticket.description_text}}', 'Välj klockslag:',0)+length('Välj klockslag:'), indexOf('{{ticket.description_text}}', 'Bifoga',0)),
if(regexMatch('{{ticket.description_text}}','Övrig'),
substring('{{ticket.description_text}}', indexOf('{{ticket.description_text}}', 'Välj klockslag:',0)+length('Välj klockslag:'), indexOf('{{ticket.description_text}}', 'Övrig',0)),
if(regexMatch('{{ticket.description_text}}','Bifoga'),
substring('{{ticket.description_text}}', indexOf('{{ticket.description_text}}', 'Välj klockslag:',0)+length('Välj klockslag:'), indexOf('{{ticket.description_text}}', 'Bifoga',0)),
substring('{{ticket.description_text}}', indexOf('{{ticket.description_text}}', 'Välj klockslag:',0)+length('Välj klockslag:'), indexOf('{{ticket.description_text}}', 'Behandling',0))
)
)
)
I have this different test texts I like to match
Välj klockslag: 10:00-12:00 Behandling
Välj klockslag: 10:00-12:00 Övrig
Välj klockslag: 12:00-14:00 Bifoga Övrig
Välj klockslag: 12:00-14:00 Bifoga
If I test the IF expression by them they work.
If I test the substring by them self they work as well.
Anyone have any idea why it’s not working?