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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Button Action on Field Selection

Hi Team,

I have few actions which are performed when i click a button. When I click a button, it displays a chart based on the button value.

My requirement is to show the chart when I click on a row in straight table which i am successfully able to show but the chart doesn't change even if I change the values.

When I click the row in straight table, I want the button actions to be triggered. Is it possible to perform, even i tried OnAnySelect Trigger but it doesn't work.

Please help!

2 Replies
Not applicable
Author

I've done something similar by using triggers on the data items displayed in the straight table.

Scenario:  Your straight table shows fields A, B and C.

  • Go to Document Properties and select the 'Triggers' tab.
  • Select field A from the 'Field Event Triggers' list.
  • Click on the "On Select" / "Add Actions" button. A dialog will be presented to allow you to add actions.
  • Now, repeat the events that you had for your button that displays the chart.

If you need to have the straight table display the chart if any field is clicked on the row then you need to repeat this process for each field.

BEWARE - there's a strange thing that can happen now.  If a selection is made against A somewhere else in your document then the actions will be executed.

You could avoid this by creating aliases for A, B and C in your loader script.

AliasesForABC:

LOAD

     A as AltA,

     B as AltB,

     C as AltC

RESIDENT ((the table ABC are in)) ;

Now use the 'Alt' fields in your straight table, and set the triggers against those instead of A, B and C.  Use A/B/C elsewhere in the document.  The triggers only execute when a selection is made from a row in the straight table.

Hope this helps!

Anonymous
Not applicable
Author

I am not entirely certain of what you really are after, but have a look at the attached qvw.

What this does is if a single Group dimension value is selected, which can be by clicking it in the Straight Table. Then, and only then, is the Pie Chart calculated and displayed, otherwise the error message 'Only one Group can be selected'.

But the Straight Table is configured to not respond to the any selection via Set Analysis in its expression.