How to SUBSTUTITE a '?

SUBSTITUTE( “’”, “_”) gives syntax error.

How do you substitute a quote character (’)

The reason I need to do this is to get the correct file name because Appsheet seems to automatically substitute ’ with - for some reason when creating a PDF giving rise to a mismatch in the physical file and the original filename

Hi, did you try that ?

SUBSTITUTE( “\’”, “_”)

Just an idea…

Does not work

1 Like
1 Like

Need the column you want to SUBSTITUTE the value in.

I am doing SUBSTITUTE([WhaterField] , “’”, _")

Its that fact that " " with ’ inside foes not work!

Other sunstutute are OK.

Most languages can use " or ’ as text delimeters so you cane delimte either " or ’

Apsheet doesn’t so you cannot substute a ’ with something else in a string.

Oh, you want to replace an apostrophe. Whoops!

1 Like

Still seems like something that would count as a bug to be fixed? Rather than finding 1 forum post on the matter :man_shrugging:

It is definitely a bug. As I understand it, the expression parser is an external library, and fixing this bug would require patching the library, which isn’t desirable.

@natalie, can you share any insight here?

1 Like

A bug? I thought that’s just how it works.

That sounds like a might break other formulas event which I would definitely rather not have.

1 Like

Yes, fixing the issue is nontrivial due to reasons mentioned above. Please continue to use the suggested workarounds, eg, replace where you intend to use "'" with TRIM("' "). Thanks!

3 Likes

I guess so long as there is A method that’s what really counts.

1 Like

Heres’s one workaround courtesy of @Aleksi

SUBSTITUTE(“Sample’text”,LEFT("’ “,1),”")

3 Likes