Sort by field display values in the Data window

Source: Internet
Author: User
Tags add expression string sort window
Sort | data | show
A data window has a field: The person code, now displays it as the person's name in the Ddw method. The question is how to sort by name rather than by encoding.

PB's help in the syntax for sort order shows that Setsort has two sorts of syntax: columnname ordering eg.  "Emp_lname A" "Emp_lname A, dept_id D" # columnnumber order eg. "#3 A"

However, the test found that you can sort by computed columns:

So, add a new computed column compute_1, the expression is Lookupdisplay (emp_id), and then hide it

String Newsort

Newsort = "Compute_1 D"

Dw_1.setsort (Newsort)

Dw_1.sort ()

I hold to try the attitude directly with the expression of the sort, incredibly found also can! I did not think PB also left such a hand:

String Newsort

Newsort = "Lookupdisplay (emp_id) D"

Dw_1.setsort (Newsort)

Dw_1.sort ()

In addition, some netizens say there is a service in Pfc. After the data window opens the Sort service, add Inv_sort.of_setusedisplay (TRUE). This I have not used, for everyone's reference.

Note: This article is originally contained in the Pdriver.com blog.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.