Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Button to search empty fields

Is there a way to have a button display all the fields that are empty in a given column? I can pick them in Qlikview, so they must have a space of some sort.

Any ideas?

I tried putting =  * in the search string but it wont search a space.

6 Replies
swuehl
MVP
MVP

Try something like this in the search string of your button select - select in field action:

='= not len(trim(FIELDNAME))'

and put FIELDNAME of course also in the entry box of the action dialog.

Hope this helps,

Stefan

Not applicable
Author

That didn't work. Any other thoughts?

Not applicable
Author

I would edit your load script and use if(isnull([FIELDNAME]),'BLANK',[FIELDNAME])

i.e.

LOAD XYZ,

      if(isnull(XYZ),'BLANK',XYZ) AS XYZNEW,

FROM .......

swuehl
MVP
MVP

isnull() will not return true if the field contain some sort of spaces. You need to use

if( len(trim(FIELD))=0, ..

or

if( len(trim(purgechar(FIELD, chr(160)))) = 0,...

instead.

ethanjbeau, could you upload a small sample file? I assumed your column is a field (e.g. displayed in a list box), not a column in a table that was calculated by an expression.

Not applicable
Author

yes the column is a field. I ended up coping one of the "blank" cells and pasting it and the button works correctly. Now I need to also have it search for nulls and im not sure how to do that.

swuehl
MVP
MVP

Using one of the methods above to create a new field in the script to flag BLANK / NULL should do what you want.