0

removing embedded quotes from a text object

still learning. 

How can I remove embedded double quotes from a text variable?

 

xText contains ->  this is a test'''to remove embedded quotes

15 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    I’m guessing some javascript will be needed as Ninox doesn’t have a way  of searching for quotes. It always thinks any quote mark is part of the code. You can search using regex, but when you try to use the same code in Ninox it thinks the quote mark are part of the code.

    Someone smarter will hopefully come up with a solution.

    • NYNNA
    • Louis_Cornacchia
    • 1 yr ago
    • Reported - view

    Thank you Fred.

     

    Anyone?

    • Sean
    • 1 yr ago
    • Reported - view

    Unless something complex is just sailing over my head you can use the replace() function. I want to point out that your example shows 3 single quotes not double quotes. Anyway, using your example I am able to remove the quotes with this...

    replace(xText, "'", "") or replace(xText, "'", " ") to replace the quotes with a space.

      • Fred
      • 1 yr ago
      • Reported - view

      Sean Can you make it work for double quote marks?

      • Sean
      • 1 yr ago
      • Reported - view

      Fred Yes, this works... replace(Text, """", " "). That's 4 double quotes.

    • Fred
    • 1 yr ago
    • Reported - view

    Well I the MacOS app and iPad react differently, which is just a sign that Ninox is not keeping the two apps in sync.

    If I put the following in a formula:

    replace(Test1, """", "")
    

    The iOS app doesn't allow it while the MacOS app does.

    But it doesn't work in MacOS. Here is the result:

    No changes.

    I even tried replacex():

    replacex(Test1, "("")", " ")
    

    And still no luck.

     

     

    Maybe the cloud version allows it and is functional.

      • Sean
      • 1 yr ago
      • Reported - view

      Fred Almost all of my work is done in the Mac app since I don’t have a cloud account. I’m not sure why it’s not working for, but I’ll upload an example db shortly.

      • Sean
      • 1 yr ago
      • Reported - view

      It does work in the iOS app as well. Just tested it.

      • Sean
      • 1 yr ago
      • Reported - view
    • Fred
    • 1 yr ago
    • Reported - view

    Well that is very interesting Sean . I checked and I'm running 3.7.14 now on both MacOS and iOS and I still can't get it to work. Though now I can type in the code with 4 double quotes and iOS will accept it.

    I've attached the DB. Select Table1 and the first record to see the fields. All the other tables are not associated with this issue just sample tables to work out other issues.

      • Sean
      • 1 yr ago
      • Reported - view

      Fred You are using a different quote style in the Text field than the quote style in the Formula field. This would work with the quotes you have... replace(Test1, "”", "").

       

      I would recommend you turn off "Use smart quotes and dashes" if you haven't already.

    • Fred
    • 1 yr ago
    • Reported - view
    Sean said:
    I would recommend you turn off "Use smart quotes and dashes" if you haven't already.

     Good catch!

    Now I get:

    Weird. It would seem like it would either find the 2 double quotes or not function at all if it can't figure out the double quotes.

      • Sean
      • 1 yr ago
      • Reported - view

      Fred You have both styles of quotes in the Test1 Text field so you would need to use this formula... replace(Test1, "”""", "")

      • Fred
      • 1 yr ago
      • Reported - view

      Sean Those "smart" quotes are annoying. I thought I deleted them all then added the regular double quotes, but I guess for some reason the app decided to bring it back. Anyways, deleted all double quotes and added them back and now the formula works.

      Thanks,

    • NYNNA
    • Louis_Cornacchia
    • 1 yr ago
    • Reported - view

    Fascinating discussion. And very helpful. Thank you both. 

Content aside

  • 1 yr agoLast active
  • 15Replies
  • 174Views
  • 3 Following