Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
warfollowmy_ver
Contributor III

Change sort-priority in straight table with macro

I understood how to change the sorting order in expressions and dimensions of a direct table, but this doesn’t do anything for my task until I can control the sorting priority.

How can I use the macro to change the sort priority order in a straight table?

 

set chart=ActiveDocument.GetSheetObject("CH11")

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop

Labels (3)
1 Solution

Accepted Solutions
warfollowmy_ver
Contributor III

Re: Change sort-priority in straight table with macro

set chart=ActiveDocument.GetSheetObject("CH11")

chart.SortBy 10

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop

 

1 Reply
warfollowmy_ver
Contributor III

Re: Change sort-priority in straight table with macro

set chart=ActiveDocument.GetSheetObject("CH11")

chart.SortBy 10

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop