Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Attach/Detach an object for selecting List Box

Hi,

It is possible to attach or detach a graph/Char only for some List Box? I means that, i have three list box which list Year, Services and régions. I want that, when i select a year or a service, the char/graph change for the selected values and do not change when i select a region.

Thanks for your reply

6 Replies
mongolu
Creator
Creator

You could put a calculation condition on that chart.
Something like this:

=IF(GetSelectedCount(REGION)>0,0,1)

Not applicable
Author

Thanks for your reply,

When i do that, if i select a region, i got a message 'Calculation condition unfulfilled'. It is possible to put default value of list value for the graph or char?

mongolu
Creator
Creator

i don't understand the question.

mongolu
Creator
Creator

Attach/Detach

You could achieve this by macro.

Something like this:

SUB TEST
v_AgentCnt = ActiveDocument.Evaluate("=GetSelectedCount(REGION)")
If v_AgentCnt>0 Then
ActiveDocument.GetSheetObject("CH01").Detach
Else
ActiveDocument.GetSheetObject("CH01").Attach
End If
END SUB


And put it on the field you want (Document/Properties/Triggers/Field Event Triggers) on OnChange event.
(if you're using qv lower than ver 9, Document/Properties/Macros/Field Event Triggers).

ssamuels
Partner - Creator
Partner - Creator

Hi,

You only want the expression values in the chart to be recalulated when you select a year or a service?

If that is what you want, you should change the expression for the calculated values by using Set Analysis.

Example:
The expression "sum($<Region = {*}> }Sales)" will calculate the sum of Sales for all the regions that are in stored in the datacloud. When you select one region the calculated value of the expression will not change.

Not applicable
Author

How can it be done for lower version of Qlikview, say version 8.20 ?