Sort by the display value of the field in the data window

xiaoxiao2021-03-06  16

There are fields in a data window: personnel coding, now use DDW methods to display it as a person's name. The problem is how to sort by name in sorting instead of being sorted by coding.

In the help of PB, Syntax for Sort ORDER illustrates the Syntax For Sort ORDER: ColumnName Order Eg. "EMP_LNAME A" "EMP_LNAME A, DEPT_ID D" # ColumnNumber Order EG. "# 3 a"

However, the test discovery can be sorted by the calculation column:

Therefore, a new plus column compute_1, the expression is lookdisplay (EMP_ID), and then hide it off

String newsort

Newsort = "compute_1 d"

dw_1.setsort (newsort)

DW_1.SORT ()

I have been trying to use the attitude to use the expression, and I can find it! I really didn't think PB left such a hand :)

String newsort

Newsort = "lookupdisplay (emp_id) d"

dw_1.setsort (newsort)

DW_1.SORT ()

In addition, some netizens say that there is ready-made service in the PFC. Adding INV_SORT.OF_SETUSPLAY (TRUE) after the data window opens the sorting service. I have not used this for your reference.

Note: This article was originally loaded from himself from the blog of PDRIVER.com.

转载请注明原文地址:https://www.9cbs.com/read-46126.html

New Post(0)