Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

Sorting records in a datawindow

The requirement is that along with the Sort fields mentioned at the run time, the datawindow should be sorted on additional 2 more fields which should be hard coded, but after the other sort fields have been mentioned at run time.

so that my SetSort statemnent would in effect look like
dw_control.SetSort("field1_run_time , field2_runtime,AAA,BBB")

AAA,BBB- harcoded field names

Thanks in advance
1 Solution

I'm a little confused.  It looks like you already know the answer...

Put the runtime sort fields into a comma separated string variable and append the hard coded columns to it, and pass the variable to setsort() then call Sort().

If you need to obtain the runtime specified columns from the datawindow you can get them with the following

dw1.Describe ("DataWindow.Table.Sort")

DhivyaBinoAuthor Commented:
Thanks a bunch for the quick reply.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now