Then the output was 12:00-14:00 (pls see screenshot) but that is presumably bc that was the first matching value it came to.
Does the {{ticket.description}} come in with all this text? Or just one of the lines above mixed in with other text?
When I replaced the other Valj lines with other text, however, the IF failed bc it’s looking for the next iteration of “Valj klockslag” to terminate the substring extract.
Are you trying to output the time range?
You could replace that length(‘Valj klockslag: ‘) with a simple numeric value i.e. +16 as here followed by the 2nd indexOf +27 so you will get the 11 chars in between.
Then the output was 12:00-14:00 (pls see screenshot) but that is presumably bc that was the first matching value it came to.
Does the {{ticket.description}} come in with all this text? Or just one of the lines above mixed in with other text?
When I replaced the other Valj lines with other text, however, the IF failed bc it’s looking for the next iteration of “Valj klockslag” to terminate the substring extract.
Are you trying to output the time range?
You could replace that length(‘Valj klockslag: ‘) with a simple numeric value i.e. +16 as here followed by the 2nd indexOf +27 so you will get the 11 chars in between.
It’s part of a larger text so it’s one matching of many but it’s dynamic form that changes depending on the customers input.So I can’t use fixed positions.
Sorry couldn’t add more due to it’s internal for the customer.
I’m trying to extrakt the time range yes.
I’m using the {{ticket.description_text}} to remove all the HTML data. I guess {{ticket.description}} would work as well.
0)), the first ) closes the second indexof function and the last one is for the substring.
I see ty. What I’m finding is that there is no unique terminating character or phrase that your expression can use to pull out the time range from the text.
Unless there is just a single instance of these rows in the inbound ticket?
The IF is satisfied by the first occurrence of “Bifoga Ovrig” and sends out all text between Valj klockslag:” and the next occurrence of “Bifoga” - which is Bifoga by itself.
But in that case, using the relative positions of the info between the end of “Valj klockslag:” and the start of Bifoga pulls out too much info.
@daniel.soderlund - please confirm my findings - the biggest issue is that there is a bug in Expression builder. @support@rashmi.nag
Nested IF is not reading the statement correctly, it cannot find the output for the FALSE condition. It will fail on 2 situations (1) when none of the conditions resolve to TRUE and (2) if the TRUE condition is not the last condition in the statement.
Seen here - very simple statement - IF(1<2,’true’,’false’) output = ‘true’ but when we make a nested IF the output for FALSE comes from further down the line as you can see in the example below.
And when no conditions are TRUE - it throws a new error although it’s the same reason as above, the expression cannot find the output for FALSE. The new error made it hard to figure out what was happening.
@prats / @Ammar KB - Could you look into this query from @daniel.soderlund and @BrynCYDEF?
I see ty. What I’m finding is that there is no unique terminating character or phrase that your expression can use to pull out the time range from the text.
Unless there is just a single instance of these rows in the inbound ticket?
The IF is satisfied by the first occurrence of “Bifoga Ovrig” and sends out all text between Valj klockslag:” and the next occurrence of “Bifoga” - which is Bifoga by itself.
But in that case, using the relative positions of the info between the end of “Valj klockslag:” and the start of Bifoga pulls out too much info.
You are on it, There are 3 different scenarios and end of the matching text differ. I could do several expression nodes. I already have 20 nodes, what would another 3 do :)
@daniel.soderlund I beileve you’ve raised it with our Support Team, Our best minds are working on it,
The issue looks more into the substring, I’m validating this with our Developers. I apologize for the delay, Will keep you updated in the Ticket as well as our Community Page. Thanks a lot for your patience.
@daniel.soderlund I beileve you’ve raised it with our Support Team, Our best minds are working on it,
The issue looks more into the substring, I’m validating this with our Developers. I apologize for the delay, Will keep you updated in the Ticket as well as our Community Page. Thanks a lot for your patience.
Ya I have ticket in the support, it’s something with the if statement and subring. Posted here if anyone else seen the issue as well :)