Announcement

Collapse
No announcement yet.

API Search not handling empty strings

Collapse
X
 
  • Filter
  • Time
Clear All
new posts

    API Search not handling empty strings

    Trying to write an asset search using the VB.net API and struggling with empty strings.
    One of our fields has values of "Yes", "No" or blank/empty. But when trying to write an AddCriteria expression that brings back "Yes" or blank entries, it's not working.

    I thought it would be opNot "No", but that only returns "Yes entries.
    I then tried searching for any blank empty using opEqual "", returns nothing.
    I then tried searching for any blank empty using opEqual vbNull, returns nothing.

    Anyone got any suggestions?

    Re: API Search not handling empty strings

    It depends how the field is defined. In case it is a Boolean field then only Yes or No will be valid values for the query, however, if the field is textual try using the following constant string when querying $$EMP$$ instead of passing a null string.

    Hope this helps.

    Comment

    Working...
    X