Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Sort by Expression

Hi All,

How do I associate Sort Orders => Sort by Expression to a particular field in a group using a macro.

Thanks in advance

1 Solution

Accepted Solutions
Highlighted
Not applicable

Hi Miller,

Thanks for your reply. I found a way to achive this.

groups = ActiveDocument.GetGroups

set gp = groups(0).GetProperties

set sc = gp.SortCriterias

sc(0).SortByExpression = 1

sc(0).Expression.v = "sum(Amount)"

groups(0).SetProperties gp

View solution in original post

2 Replies
Highlighted
Not applicable

set fld=ActiveDocument.GetField("Salesman")

set fldsrt = fld.GetDefaultSortCriteria

fldsrt.SortByExpression = 1

fldsrt.Expression.v = "sum(Amount)"

fld.SetDefaultSortCriteria fldsrt

Highlighted
Not applicable

Hi Miller,

Thanks for your reply. I found a way to achive this.

groups = ActiveDocument.GetGroups

set gp = groups(0).GetProperties

set sc = gp.SortCriterias

sc(0).SortByExpression = 1

sc(0).Expression.v = "sum(Amount)"

groups(0).SetProperties gp

View solution in original post