Articy Forum


https://www.articy.com:443/forum/

Searching for empty feature string

https://www.articy.com:443/forum/viewtopic.php?f=4&t=1721

Page 1 of 1

Searching for empty feature string

Posted: Thu 24. Jul 2014, 20:05
by RobertGordon
Let's say I have a weapon template with a weapon feature with a 'secretName' string field. If I wanted to find all instances of this template where the secretName is blank, how would I do so using the 'matching query' dropdown of the Find objects search?

Trying
Template(Equal,weapon) AND (weapon.secretName = "")

didn't yield any results.

Re: Searching for empty feature string

Posted: Wed 30. Jul 2014, 22:29
by [Articy] Peter Sabath
Hi Rob,

we found an error in this particular query some days ago, originating from a double NULL value (the possibly non existing feature and the non existing override of the string value on any layer.)
The bug is already fixed and will be included in the 2.3.7 service release.

Currently I have no good workaround except using a special non empty string as default value in the property definition of 'secretName'

Just for info:
The Template(Equal, weapon) part is only required if the weapon feature is used in multiple templates. If not, testing for a feature's value implicitly includes an existence check.
If you only want to check for a single template using TemplateName = '<technical name of template>' is also possible and may be more intuitive to use.

Cheers
Peter

Re: Searching for empty feature string

Posted: Thu 31. Jul 2014, 13:24
by RobertGordon
I am glad to hear there is a fix coming.

Implicit checks for the template is a nice tip. That will simplify our queries. The TemplateName = 'name' version is much more user-friendly. Thanks for the tips.

All times are UTC
Page 1 of 1