What is the regex pattern to avoid quotation marks? (")

We are using the Action Tables: Add a row, but the problem is that this action tends to fail if a comma (,) and a quotation mark (") is included in the text field. I'm aware there are additional actions to replace quotation marks for double quotation marks, but this is not doable when we have over 10 different text fields that we need to validate.
Is there are regex patter we can enter to avoid users to use quotation marks (")?



  • Jozef_783863Jozef_783863 Posts: 331 admin

    @Rafael_943505 Linked below is a Show and Tell Community post that includes the following field formula to find quotes and replace with double quotes:

    result = fields['field-name'].replace(/"/gi, '""')

    Add a Row with Find and Replace (no more fix tasks)

    Please let us know if you have any follow up questions.

  • Hi Jozef,
    Thanks for your prompt answer. I actually had used this methodology for replacing the quotation marks and it works perfectly for most of our workflows. For this particular workflow, we are collecting multiples text fields from the trigger form and from 2 additional email forms. I'm afraid that adding these additional actions for each of these fields could make the workflow more difficult to maintain.
    So I was looking to avoid this issue from the source by restricting the user to use quotation marks using a short code line.

  • Jozef_783863Jozef_783863 Posts: 331 admin

    @Rafael_943505 If entry validation at the source field helps eliminate this Tables: Add a row issue, then that sounds like a good solution. In a case where the source field is from a place like as a webhook trigger, you may need to use a find and replace approach instead. I am glad to hear there was an alternative approach to addressing this issue. Thank you for sharing it!

  • Hi Jozef,
    Thanks! I will keep in mind the condition for the webhook trigger.
    I found out that by using the Regex Pattern ^[^<>"]*$ I'm able to tell the user to use single quotes instead of double-quotes.

Sign In or Register to comment.