So we have form emails that come in. Trying to get a part of the description and this was working but now all of a sudden it keeps telling me that there is a syntax error. My expression is substring( "{{ticket.description}}", indexOf("{{ticket.description}}","Start Date",0)+12, indexOf("{{ticket.description}}","Previous Dealer",0)-5). The syntax error that it gives me is Invalid Syntax - Missing ). but it does the same if you just try to get the indexOf part. My expression builder is set to string and I have tried numbers as well. Any help would be appreciated.
Page 1 / 1
I figured it out. There was a quote ‘ in the description which was causing problems with the expression. I used liquid filter to remove the quote in the description. So my expression became
substring( "{{ticket.description | replace: "'",""}}", indexOf("{{ticket.description | replace: "'",""}}","Start Date",0)+12, indexOf("{{ticket.description | replace: "'",""}}","Previous Dealer",0)-5)
which seems to work.
Reply
Sign in to the Community
No account yet? Create an account.
Social Login
Login for Freshworks Employees Login with LinkedInor sign up below
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.