Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Need help with a condition

Hi, I have a button I would like to hide if the user hasnt selected a value from a column. Right now I am populating the value selected into a variable, so its like:

vName = Only(Table.Name)

So I would like to evaluate vName so that if it = '', then I will hide the button using the Show Condition. Any ideas how I can do this?

So IF vName = ''

     then <hide>

ELSE

     show.

1 Solution

Accepted Solutions
Highlighted

in properties of the button, tab layout, section show:

set in the conditional box:

=getselectedcount(myField) > 0

let me know

View solution in original post

7 Replies
Highlighted
Not applicable


What would be even cooler, would be to leave the buttons, but just fade them out, as opposed to hiding them, if that were possible...

Highlighted

in properties of the button, tab layout, section show:

set in the conditional box:

=getselectedcount(myField) > 0

let me know

View solution in original post

Highlighted
Not applicable

Ah thanks, but the field is a string, not a number, will this make a difference as you have > 0 there. I was expecting ' '...

Nope that works perfectly! Thanks

Any ideas if I can just grey the button out and disable it, as opposed to hiding it?

Highlighted
Contributor III
Contributor III

You don't need to use a variable.

Just right click the button and go to the Background color window. In the "Base Color" area, choose "Calculated" and add your formula. The one shown below set the button background as Blue if the selected value is equal 1 and a light blue if it's not equal 1.

if(Field = 1, ARGB(255, 0, 0, 255), ARGB(50, 0, 0,255))

Highlighted
Not applicable

Cool, but even if its light blue, it will still be able to be enabled, right? I want to disable the function too.

Highlighted
Contributor III
Contributor III

There is a "Enable Condition" in the Button Properties Page. Just set it to Field = 1 (my example) and it will be disabled when a value not equal 1 is selected.

Highlighted
Not applicable


Perfecto. Many, many thanks.