12-29-2011 09:37 AM
I'm using the following query for a content view using Studio:
ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND zdoctype:ztype ILIKE 'zaxis_customer' AND ZCUSTII:Contact/*/ContactEmail ILIKE '%ZC1236%'
The Contact field is a complex list within which one of the fields is ContactEmail and I'm trying to search for the ZC1236 pattern and list all the documents which contain that email pattern.
When executed I get the following error:
SELECT DISTINCT, ORDER BY expressions must appear in select list.
It seems I do not have control, in Studio, with where the SELECT DISTINCT AND ORDER BY expression appear in the query.
Can this type of query work in studio content view?
The following query works in nuxeo shell:
Select * FROM Customer Where ( ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND ZCUSTII:Contact/*/ContactEmail ILIKE '%ZC1236%')
Ultimately I'd like to take an email address and query the customer documents for a match then relate that email to the customer document.
12-29-2011 03:04 PM
Your error message seems to be coming from the database (PostgreSQL?), not from NXQL. In that light, the results of your tests with the Nuxeo Shell seem confusing to me. It might sound like a naive question but are you performing both tests against the same running Nuxeo instance?
Also, reading from your description I am not sure you need this syntax for your specific scenario:
ZCUSTII:Contact/*/ContactEmail
Could you try to replace the above fragment with the following instead and let us know about the results? :
ZCUSTII:Contact/ContactEmail
12-30-2011 07:55 AM
Yes, I am using PostgreSQL, single instance.
12-30-2011 08:38 AM
Could you try matching both queries in both systems?
12-30-2011 10:16 AM
After I removed the suggested fragment, in Studio, I got the following error
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.