Skip to main content

hi

i am trying to build an automatic flow and use the expression builder to read a value from the last written note.

The text that we are going to get is surrounded by this character "

Can you use excape characters to get the expression builder to understand which character it should, for example, replace?

For example. replace('Testing " if it " works',' " ','*') to replace " with *.

I get an error message that says
Invalid syntax - Missing right parenthesis

Makes sense! I’ve got this down as a potential enhancement for the expression builder. 


@vishal.abraham Thanks for passing this along to the product team. 💪


Opened a case yesterday for similar issue.  Trying to sanitize last name before account creation in AD to remove spaces, dash, single quotes, etc.  Also getting the invalid syntax error.


Opened a case yesterday for similar issue.  Trying to sanitize last name before account creation in AD to remove spaces, dash, single quotes, etc.  Also getting the invalid syntax error.

Have you tried using? Powerful Placeholders with Liquid Filters : Freshservice
remove – Liquid template language (shopify.github.io)
strip – Liquid template language (shopify.github.io)
 


Opened a case yesterday for similar issue.  Trying to sanitize last name before account creation in AD to remove spaces, dash, single quotes, etc.  Also getting the invalid syntax error.

Have you tried using Liquid Filters ? Introduction – Liquid template language (shopify.github.io)
The Remove and Strip filter. 


Opened a case yesterday for similar issue.  Trying to sanitize last name before account creation in AD to remove spaces, dash, single quotes, etc.  Also getting the invalid syntax error.

Tried using Liquid Filters? 


anyone get a solution on this?


Opened a case yesterday for similar issue.  Trying to sanitize last name before account creation in AD to remove spaces, dash, single quotes, etc.  Also getting the invalid syntax error.

Tried using Liquid Filters? 

I’m not sure what you are suggesting.  I can replace most characters just ASCII Code 39 is the issue because it gets interpreted as a string terminator.   In powershell I could use something like $string.Replace(gchar]39,””), but there doesn’t seem to be an equivalent.


I tried {{ "e3.result" | replace: “’”, "" }}.  No luck.  Invalid operand.  Then I saw regexreplace is available.  But that doesn’t seem to work either.  I can’t escape the single quote.

So if someone enters O’Grady instead of O`Grady (single quote instead of apostrophe) I can’t clean the string.  Problematic because AD and 365 will accept a userpincipalname or email address with those characters but as you try to push that out to other integrated systems they are often not accepted.


ok so I think my misunderstanding is that Liquid filters can be used in app actions, but they are not accepted in expression builder.


ok so I think my misunderstanding is that Liquid filters can be used in app actions, but they are not accepted in expression builder.

I think I got Liquid to work, you like to remove ‘ from a placeholder? 
You shouldn’t use "e3.result" it needs to be just e3.result 

What is your next step b/q you can use Liquid when you add the PH in a note, field or JSON payload. 

 

//Daniel


ok so I think my misunderstanding is that Liquid filters can be used in app actions, but they are not accepted in expression builder.

I think I got Liquid to work, you like to remove ‘ from a placeholder? 
You shouldn’t use "e3.result" it needs to be just e3.result 

What is your next step b/q you can use Liquid when you add the PH in a note, field or JSON payload. 

 

//Daniel

The next step is an expression that builds samaccountname which is then used to verify it does not conflict with an existing user and later to create JSON payloads for proxyaddresses, etc.

Correct trying to remove ‘ from a placeholder.  


If I could use escape from Liquid I could then use replace to get rid of '

escape – Liquid template language (shopify.github.io)


If I could use escape from Liquid I could then use replace to get rid of '

escape – Liquid template language (shopify.github.io)

What happens if you use sanitize_html ?

Powerful Placeholders with Liquid Filters : Freshservice


Reply