Zum Hauptinhalt gehen

Text Replace Activity for apostrophes - Issues

Kommentare

6 Kommentare

  • Berend Veldkamp

    When I try the search, it seems to be working, and single quotes are replaced correctly? 

    If you fixed it in the meantime, could you please let us know here?

    0
  • Mary Wagner

    Hello, 

     

    It's still not working correctly:

    The autocomplete returns options, user selects and when the selection has an apostrophe, an error box is returned with a (0) for results. 
     

     

    0
  • Berend Veldkamp

    Oh I get it, there's an error after the user clicks on submit.

     

    Looking at your workflow, I think it's an easy fix. In the ‘query10’ activity, update the Where to look like this:

    =`Name='${ $form10.state.autoComplete10.value.replaceAll("'", "''") }'`

     

    The Text Replace activity can also be used instead, just look at how it's done in the Suggestion subworkflow that's already there. But in simple replacements like this, I tend to just use the JavaScript version (documentation). 

    2
  • Mary Wagner

    Thanks!  I am going to give this a try.   I was expecting that the “Text Replace" part of the workflow would have handled this..

     

    Mary

    0
  • Berend Veldkamp

    The Text Replace activity inside the Suggestions subworkflow only handles the query where the suggestions list is populated, i.e. when a user types a single quote.

    After the form submit, there is another query ('query10') where single quotes must also be doubled.

    0
  • Mary Wagner

    Thanks, that makes sense! 

    All of our searches are working now.  Thanks again for the help.

     

    Mary

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.