Page 1 of 1

How to run a condition on a relation

Posted: Mon Jul 08, 2019 4:22 am
by candell
Could someone help me with the syntax if it is indeed possible to run a condition on a relation. For example, if I want to update all contacts with no owner, I'd like to do

where owner.id != 1

But that returns nothing, I also tried other variations

owner.id != 1
owner.id <> 1
owner(id) != 1
owner(id) <> 1
owner(id != 1)
owner(id <> 1)
!owner.id = 1
!owner.id: 1

with no luck.

I had to fetch all contacts and check the contacts which seems a very long way to achieve this.

Thanks

Re: How to run a condition on a relation

Posted: Tue Jul 09, 2019 9:30 am
by kschutten
Hi Candell,

You can achieve what you want with the following Lucene syntax
*:* AND NOT owner.id:1 ( = not equal to 1)
OR
*:* AND NOT owner.id:[1 TO 99999999] ( = not between 1 and 99999999)

Re: How to run a condition on a relation

Posted: Wed Jul 10, 2019 9:24 am
by candell
Thanks for the reply, I was sooooo close

How to run a condition on a relation

Posted: Tue Aug 13, 2019 8:01 am
by Mariarew
Hello froy316,
Could you please clarify how long did you wait before check the status?
Could you please wait two minutes after the losing of connection and then check the status?

Image:)