Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am new to Qlikview and therefore have lots of questions ...
How can I retrieve the text of a button in an action associated with the button?
I want an action button to initialize the value of a variable with this text ...
Thank you for your help ...
Denis
hei
i bulit a new macro Base on the precious Example
look at macro Getbutton 4
you can use it on all buttons
Hi ,
What i understand from your question is to set a value for variable by clicking on button.
Whether it is correct or not ?
Regards
Venkat
It's correct...
Denis.
Hi
I would first create a variable which I would use as the Text of the button.
Here is an example:
I would start with this statement in the Load Script:
Let vButtonText = 'State 1';
In the GUI I would do like this for the button, first set the text:
Then I could use it like this (toggling between two texts)
Then I could do all sorts of things depending on the value of vButtonText.
hth
Thank you for your response, GandaldGray, but it does not match my use case.
I have a set of buttons, each with their name and I want to get in a variable the text of the button that was clicked.
Denis
Hi dbouilleaux
Then you could simply add an action for each button setting the variable you want to be set to the text of the button.
hth
Hi
First Create a Variable 'vText' from Document Properties.
Now Create a button, then Go to the Actions Tab .
In Add Action -> External -> Set Variable .
Provide your variable in Set Variable and below to that give 1 and click on ok.
After clicking the button the variable 'vText' will be assigned to 1.
Regards
Venkat
Hi,
Please find the attached sample may help you.
Cheers.
Thank you, Blackrock, for your answer.
Your solution would be ideal if I could access the Id of the button clicked ...
What I seek in fact, is a generic macro that I could use all my buttons and avoid one-button macro ...
Denis
hei
i bulit a new macro Base on the precious Example
look at macro Getbutton 4
you can use it on all buttons