Fetching records with multiple sort criteria

Fetching records with multiple sort criteria

Wondering if anyone has had success running through a for each collection with multiple sorting instructions....

Example

In a view's script you have....

  sort by
    (
        rep_name_grid   ascending
        Talked_to_this_rep   descending
    )

In a collection it looks like this.....

for each r in Form_Name  [group == group_var] sort by  rep_name_grid  range from startval to (endval  -  1)

However, in collecting records you set asc and desc in the scriptbuilder :)

I tried to make the syntax work (tried "sort by rep_name_grid Talked_to_this_rep desc" and "sort by rep_name_grid && Talked_to_this_rep desc") and neither worked :(

So I know I could probably do a list add with my first sort and then resort with the second requirement but that would just be really hard to collect multiple vars.

Ok, let me know! :)