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

Disable expression by a macro

Can a expression be disable with a macro???

1 Reply
spsrk_84
Creator III
Creator III

Hi,

Yes expression can be disabled through macro.

I found this example in the API Guide.Qvw file.

Just go through the sample

//////////////////////////////////////////////////////// Below is the Sample Code which will create a straight table and disable's the first expression//////////////////////////

Set chart=Activedocument.activesheet.createStraightTable

Chart.AddDimension "Customer'

Chart.AddDimension "ProductType"

Chart.AddExpression "Sum(Amount)"

Chart.AddExpression "Count(Customer)'

Set Cp=Chart.GetProperties

Set Expr=Cp.Expressions.item(0).Item(0).Data.ExpressionData

Expr.Enable=False

Chart.Set Properties Cp

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////