Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator 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
Highlighted
Creator III
Creator 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

 

View solution in original post

1 Reply
Highlighted
Creator III
Creator 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

 

View solution in original post