How to search on a null value in an index aggregate filter?
Application Type
Reactive

I am trying to search on a string which contains multiple values including one null value. My index works fine until the null value is introduced to the string.

Filter applied:

An example of what a Client.SelectedHistoryDocumentClasses value could be is "CMDU, , HCLU".

Hi Roisin,

Can you try: Index(Client.SelectedHistoryDocumentClasses, Document.DocumentClass) <> -1 or (Index(Client.SelectedHistoryDocumentClasses, ",,") <> -1 and Document.DocumentClass = "")

Hope this helps,

Khuong

Hi Khuong,


Thank you for the suggestion but unfortunately it does not work, only the non null values are being returned by the aggregate

Hi Roisin,

The idea is that we checking the search keyword (which is client variable) that content a null value. I'm not sure is their a space between 2 commas or not. 

To make sure I think you can try to trim (using Trim() function) each item before join into a string. If there is already a string, so you can split it then join again with Trim(). Then can try my above filter again. 

Hope this helps,

Khuong


maybe you can use the null functions:

data = NullBinary()  
date = NullDate() 
text = NullTextIdentifier()
object = NullObject()
userId = NullIdentifier()

Hi , you can simply add a filter like 

Client.SelectedHistoryDocumentClasses = keyword or

Client.SelectedHistoryDocumentClasses = Client.SelectedHistoryDocumentClasses
so if you’re passing nothing in the search keyword it’ll return true for all records and it’ll fetch entire data

Let us know If your requirement is something other than this

Thanks,

Sandeep.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.