cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle the " ' " in UI as it does not make NXQL crash ?

Antoine_Cordier
Star Contributor
Star Contributor

Hello Nuxeo people,

I'm using the studio and in this case i'm focussed on the Content Model -> Structure Templates functionality.

My problem is if i want to create a document with a ' in it (for instance "L'école ...") i have to pass my document title as "L\'école ..." if i don't want NXQL to crash when attempting to create the given document.

The result is an unwelcomed \ in the document title in the UI 😞

Please, what can I do to make this kind of conversion transparent ?

Thank you !

Antoine

1 ACCEPTED ANSWER

Antoine_Cordier
Star Contributor
Star Contributor

OK,

It was all my mistake as I attached a trigger to workspace creation in that domain.

This trigger is using a NXQL query to determine whether a chain should run or not.

So this made my day:

Replace : SELECT * FROM Document WHERE ecm:path='@{sectionPath}'

With : SELECT * FROM Document WHERE ecm:path='@{sectionPath.replace("'", "\'")}'

Cheers,

Antoine

View answer in original post

1 REPLY 1

Antoine_Cordier
Star Contributor
Star Contributor

OK,

It was all my mistake as I attached a trigger to workspace creation in that domain.

This trigger is using a NXQL query to determine whether a chain should run or not.

So this made my day:

Replace : SELECT * FROM Document WHERE ecm:path='@{sectionPath}'

With : SELECT * FROM Document WHERE ecm:path='@{sectionPath.replace("'", "\'")}'

Cheers,

Antoine

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.