Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

hide select field when is empty

Hi,

Is there a QV function to see if a select field/dimension is empty. I want to hide the select field if there is no dimension value.

1 Solution

Accepted Solutions

Re: hide select field when is empty

What do you mean with 'empty'? No data values loaded? Then the fieldvaluecount('MyFieldHere') will be 0. You can use that as a conditional expression on the Layout tab for a listbox or for the conditional expression on the Dimensions tab for a dimension in a chart.


talk is cheap, supply exceeds demand
10 Replies

Re: hide select field when is empty

there is a check box in the dimension page: "Suppress when value is null", try to check and let me know

Re: hide select field when is empty

Hi,

try Isnull(FieldName)

or len(trim(fieldName))=0

If you want hide empty/Null field from chart then you can click on supress when value is null from Dimesion tab.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable

Re: hide select field when is empty

I don't see this attribute

it is an list box object I want to hide if there are no values

Re: hide select field when is empty

Ok, then write:

in the general tab, at the bottom of field name list there is an tem "Expression", select it and write

If(trim(myDimension)='', null(), myDimension)

Not applicable

Re: hide select field when is empty

I want to hide/show a selection box if there are no values in it at all.

Re: hide select field when is empty

IN the layout tab there is a "show" section, in conditional write:

GetPossibleCount(myField) > 0

Re: hide select field when is empty

Hi

Write in expression with if()

like

if(len(trim(fieldName))>0,FieldName)

Or write this in Script

if(len(trim(fieldName))>0,FieldName) as New_fieldName,

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

Re: hide select field when is empty

What do you mean with 'empty'? No data values loaded? Then the fieldvaluecount('MyFieldHere') will be 0. You can use that as a conditional expression on the Layout tab for a listbox or for the conditional expression on the Dimensions tab for a dimension in a chart.


talk is cheap, supply exceeds demand
Not applicable

Re: hide select field when is empty

thx works like a charm!

Community Browser