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: 4,587

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...
*GLPI 9.1.6+fusion9.1+1.1+behaviours1.5.0+reports+fields+appliances+pdf+badges+formcreator2.5.2 PHP7.0 Mariadb10
*GLPI 9.4.3(behaviours2.2.1+fusioninventoty 9.4+1.1+applicatifs2.5.0+fields 1.9.1)hebergé sur serveur mutualisé.

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: 4,587

Re: Search criteria non null values

to tag your  topic : edit first post and change title


Trouver la panne avant de réparer...
*GLPI 9.1.6+fusion9.1+1.1+behaviours1.5.0+reports+fields+appliances+pdf+badges+formcreator2.5.2 PHP7.0 Mariadb10
*GLPI 9.4.3(behaviours2.2.1+fusioninventoty 9.4+1.1+applicatifs2.5.0+fields 1.9.1)hebergé sur serveur mutualisé.

Offline

Board footer

Powered by FluxBB