Possible bug? Empty string searches via SOAP API

Posted by ByronB on 06-Feb-2015 11:10

We have come into an issue with empty field searches returning no results.  
For example, if First Name is null and you search using SOAP API then it returns a result but if we search for the First Name using an empty string i.e. '' , then it does not return a result.

Basically if we do an empty text search no matches are found via the SOAP API

All Replies

Posted by Gian Torralba on 06-Feb-2015 11:34

Hello,

Can you provide the methods you are doing to search the record using SOAP?

Thank you,

Gian

Posted by ByronB on 10-Feb-2015 10:00

We are using selectQuery()

SELECT id FROM object WHERE field = ""

Returns no rows even though there is an object with field as an empty string

If we create a row with a NULL field then we can successfully return it using

SELECT id FROM object WHERE field IS NULL

Posted by Srinivas Panyala on 11-Feb-2015 02:45

This is expected behavior because Rollbase stores as NULL in DB when we provide empty string to field

Thanks

Srinivas

Posted by ByronB on 12-Feb-2015 03:18

We did consider that but that is not always the case.

Sometimes storing an empty string is converted to NULL as you say but sometimes it is stored as an empty string. Then the query does not locate the data even if you do an IS NULL comparison.

Haven’t managed to figure out which fields get converted to NULL and which go in as empty strings yet.

Posted by Gian Torralba on 12-Feb-2015 08:34

Hello Byron,

Can you pinpoint this? It might be different for each field types and how it handles the empty string/null value.

Thank you,
Gian

This thread is closed