Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

button on/off by clik

Hello everyone,

I have a button to select in a particular field when i clik on it.But what i need is to turn off the button when i clik on the same button.Is there any solution for that???.I have checked the comunity with the  set variable condition o and 1 but that is not my requiremnt .

1 Solution

Accepted Solutions
MayilVahanan

hi

I think attached file what you needed??

Please click the product select button..and test it.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Add a macro as an action of the button:

Sub DisableButton

set obj = ActiveDocument.GetSheetObject( "BU01" )

set prop = obj.GetProperties

prop.EnableCondition.v = "1<0"

obj.SetProperties prop

end sub


talk is cheap, supply exceeds demand
Not applicable
Author

I don't understand why you should do it with a macro and not via an action / variable.

Why not have 1 button with 2 actions

- select in field (field you wish)

- change variable

- that variable is used to have that button conditionally disabled?

MayilVahanan

hi

I think attached file what you needed??

Please click the product select button..and test it.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

wünderbar.Thanks Mayil Vahanan Ramasamy     thtis is exactly what i need.

Not applicable
Author

Hi,

Can you please tell me the procedure.

As I'm using qlikview personal edition.

Thanks in Advance.

Regards.

Pavan.

Not applicable
Author

Hey Pavan,

I had two expressions in a chart-

  • Expression 1
    • SUM(WorkLogs) as an integer
  • Condition 1
    • vViewExp1=0
  • Expression 2
    • SUM(WorkLogs) as a percentage
  • Condition 2
    • vViewExp1=1

I then used a button to switch between the two.

New Button > Actions > Add Actions > External > Set Variable

  • Variable
    • vViewExp1
  • Value
    • if(vViewExp1 = 1, 0,1)

Clicking the button controls switching from figures as integer to figures as percentage. As multiple charts on the same tab use this variable, when I click the button all related charts change.

Hope this helps!

Dan