|
of_buildsortstring
|
|
Full name
|
pfc_w_sortmulti.of_buildsortstring
|
Access
|
public
|
Override of
|
string
|
Return value
|
string
|
Prototype
|
public function string of_buildsortstring()
|
Name
|
Datatype
|
li_found_row
|
int
|
li_i
|
int
|
li_rcount
|
int
|
ls_asc_desc
|
string
|
ls_colname
|
string
|
ls_sort_expr
|
string
|
public function string of_buildsortstring ();//////////////////////////////////////////////////////////////////////////////
//
// Function: of_BuildSortString
//
// Access: Public
//
// Arguments: None
//
// Returns: String
// The new sort string
//
// Description: Construct a new sort string based on criteria entered
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
string ls_asc_desc, ls_sort_expr, ls_colname
int li_i, li_rcount, li_found_row
li_rcount = dw_sort.RowCount ( )
FOR li_i = 1 to li_rcount
ls_asc_desc = dw_sort.GetItemString ( li_i,"sort_order")
li_found_row = idwc_cols.Find ( 'display_column = "' + dw_sort.GetItemString(li_i,"display_column") + '"', &
1, idwc_cols.RowCount () )
IF li_found_row > 0 THEN
ls_colname = idwc_cols.GetItemString ( li_found_row, "columnname" )
END IF
IF Trim(ls_colname) <> "" THEN
IF idwc_cols.GetItemString ( li_found_row, "use_display" ) = "1" THEN
ls_sort_expr = ls_sort_expr + "LookUpDisplay(" + ls_colname + ") " + &
ls_asc_desc + " "
ELSE
ls_sort_expr = ls_sort_expr + ls_colname + " " + ls_asc_desc + " "
END IF
END IF
NEXT
Return Trim ( ls_sort_expr )
end function
Name
|
Owner
|
datawindow.getitemstring |
datawindow
|
datawindow.rowcount |
datawindow
|
datawindowchild.find |
datawindowchild
|
datawindowchild.getitemstring |
datawindowchild
|
datawindowchild.rowcount |
datawindowchild
|
systemfunctions.trim |
systemfunctions
|