You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-06-14 15:21:06

grisminou
Member
Registered: 2019-06-14
Posts: 2

Search criteria non null values

Hy,

I want to search servers with non null values on a criteria.
criteria[0][field]=76677&criteria[0][searchtype]='notequals'&criteria[0][value]=NULL

I think it tries to compare whith "NULL" string.

What is the syntax for empty/null values (equavalent to SQL : IS NULL) ?

Regards

Offline

#2 2019-06-14 16:11:28

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,167

Re: Search criteria non null values

if you want to find empty values
criteria[0][field]=1&criteria[0][searchtype]=contains&criteria[0][value]=^$

or
criteria[0][field]=1&criteria[0][searchtype]=notequals&criteria[0][value]=0  (without quotes)


in your request your field is 76677  , i guess you are using computers Endpoint , what is this  76677 related to ? cant find it in search options.


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#3 2019-06-14 17:20:51

grisminou
Member
Registered: 2019-06-14
Posts: 2

Re: Search criteria non null values

Thank you for your reply.
This field is a custom field.

How to tag my question [resolved] ?

Best regards

Offline

#4 2019-06-17 11:28:05

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,167

Re: Search criteria non null values

to tag your  topic : edit first post and change title


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

Board footer

Powered by FluxBB