-
Modify Conditional Show
Juan Vitantonio Mar 23, 2012 7:02 AM (in response to Laurent-Xavier GUSSE)Yes, these are the steps:
1) Create a variable in Qlik called vShow
2) Go to your sheet properties, and under Show Conditional write =$(vShow)
3) Now create a button or go directly to your macro, and put the code:
sub Hide()
dim v
SET v = ActiveDocument.GetVariable("vShow")
v.SetContent "0",true
end sub
This will assign a 0 to the varible vShow. 0 is to hide an object (or sheet) and 1 is to show it.
-
Modify Conditional Show
Laurent-Xavier GUSSE Mar 23, 2012 7:21 AM (in response to Laurent-Xavier GUSSE)Thank you qlikuser14 - But I would like to write the conditional show in many object with a dynamic condition.So is it possible tu use macro to write the condition in the properties of the object.Thanks
-
Modify Conditional Show
Juan Vitantonio Mar 23, 2012 7:26 AM (in response to Laurent-Xavier GUSSE)The logic is the same. Create different values for each object and then assign 0 or 1 to them.
-
Modify Conditional Show
Sebastian Pereira Mar 23, 2012 10:12 AM (in response to Juan Vitantonio)lau, if i understand, you needo to do this without knowledge of how many objects you need... This is the kind of "Dynamic" condition?
You could do:
set chart = ActiveDocument.ActiveSheet.CreateBarChart
chart.AddDimension "Class"
chart.AddExpression "count(distinct Member)"
set cp = chart.GetProperties
cp.EvaluationCondition.v = "count(distinct Class)<5"
chart.SetProperties cp
Please, let me know if it was useful for you.
-
Modify Conditional Show
Laurent-Xavier GUSSE Mar 23, 2012 10:31 AM (in response to Sebastian Pereira)Thank you. It is exactly what I wanted - It seems QV doesn't know this syntax : cp.EvaluationCondition.v = !!!! Do you have any idea ?
-
Modify Conditional Show
Sebastian Pereira Mar 23, 2012 11:30 AM (in response to Laurent-Xavier GUSSE)It was an example. If you want to set the condition for the object "CH3", the code would be:
Sub EvConditionCH03
Set Obj=ActiveDocument.GetSheetObject("CH03")
Set cp=Obj.GetProperties
cp.EvaluationCondition.v = "{condition}"
Obj.SetProperties cp
End Sub
Tell me, what you need to do ?
-
Modify Conditional Show
Laurent-Xavier GUSSE Mar 23, 2012 11:46 AM (in response to Sebastian Pereira)Sorry, but EvaluationCondition is not the ShowCondition. Do you know how to change the Show Condition ?
-
Modify Conditional Show
Sebastian Pereira Mar 23, 2012 1:51 PM (in response to Laurent-Xavier GUSSE)Try:
Sub EvConditionCH03
Set Obj=ActiveDocument.GetSheetObject("CH03")
Set cp=Obj.GetProperties
cp.Layout.Frame.Show.Always = false
cp.Layout.Frame.Show.Expression.v = "{condition}"
Obj.SetProperties cp
End Sub
If doesn't works, could you tell me what you need to do?
-
Re: Modify Conditional Show
Laurent-Xavier GUSSE Mar 28, 2012 6:39 AM (in response to Sebastian Pereira)Thanks Sebastian - It is working great on tab object but doesn't work on Graph object - Do you have any idea ?
-
Modify Conditional Show
Sebastian Pereira Mar 28, 2012 10:34 AM (in response to Laurent-Xavier GUSSE)You have changed the name of the object? You must put the name of the object to modify it...
Excuse my english, but what kind of object is "Tab Object"?
-
Re: Modify Conditional Show
Laurent-Xavier GUSSE Mar 28, 2012 2:04 PM (in response to Sebastian Pereira)Hi,
Sorry to ask you some help again.
I join a QV file with your example. As you’ll see, it works very Well on the Tab Object (TB01) and there is an error with the graph object (CH01).
Do you have any idea ?
Thanks
Laurent-Xavier
De : sebastiandpereira qliktech@sgaur.hosted.jivesoftware.com
Envoyé : mercredi 28 mars 2012 16:35
À : lauxaval
Objet : - Re: Modify Conditional Show
<http://community.qlik.com/index.jspa> QlikCommunity
Re: Modify Conditional Show
created by sebastiandpereira <http://community.qlik.com/people/sebastiandpereira> in Development (QlikView Desktop) - View the full discussion <http://community.qlik.com/message/205225#205225
-
test condition.qvw 142.2 K
-
Modify Conditional Show
Sebastian Pereira Mar 28, 2012 3:24 PM (in response to Laurent-Xavier GUSSE)Ok, now I understand.
If you will do it in a graph, use GraphLayout instead of Layout
-
Re: Modify Conditional Show
Laurent-Xavier GUSSE Mar 28, 2012 4:03 PM (in response to Sebastian Pereira)Thank you very much
De : sebastiandpereira qliktech@sgaur.hosted.jivesoftware.com
Envoyé : mercredi 28 mars 2012 21:25
À : lauxaval
Objet : - Re: Modify Conditional Show
<http://community.qlik.com/index.jspa> QlikCommunity
Re: Modify Conditional Show
created by sebastiandpereira <http://community.qlik.com/people/sebastiandpereira> in Development (QlikView Desktop) - View the full discussion <http://community.qlik.com/message/205375#205375
-
Modify Conditional Show
Sebastian Pereira Mar 30, 2012 9:37 AM (in response to Laurent-Xavier GUSSE)Ok, why you don't mark as "Answered"?
-
-
-
-
-
-
-
-
-
-
-
-