|
of_buildsortstring
|
|
Full name
|
pfc_w_sortsingle.of_buildsortstring
|
Access
|
public
|
Override of
|
string
|
Return value
|
string
|
Prototype
|
public function string of_buildsortstring()
|
Name
|
Datatype
|
li_i
|
Integer
|
li_numcols_sort
|
Integer
|
ls_column
|
string
|
ls_listboxsortcolum
|
string
|
ls_sortstring
|
string
|
public function string of_buildsortstring ();//////////////////////////////////////////////////////////////////////////////
//
// Function: of_BuildSortString
//
// Access: Public
//
// Arguments: None
//
// Returns: String
// The new sort string
//
// Description: This function will construct a new sort string based on
// the 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_sortstring
string ls_listboxsortcolum
string ls_column
Integer li_numcols_sort
Integer li_i
// Get the new column to sort (if any)
ls_listboxsortcolum = ddlb_sort.text
IF ls_listboxsortcolum = NONE THEN
// None was picked.
ls_sortstring = ""
ELSE
// An actual column was picked.
li_numcols_sort = UpperBound ( inv_sortattrib.is_sortcolumns )
FOR li_i = 1 to li_numcols_sort
If ls_listboxsortcolum = inv_sortattrib.is_colnamedisplay[li_i] Then
// Get the actual column name.
ls_column = inv_sortattrib.is_sortcolumns[li_i]
// Display value or not?
If inv_sortattrib.ib_usedisplay[li_i] Then
ls_sortstring = "LookUpDisplay(" + ls_column + ") "
ELSE
ls_sortstring = ls_column + " "
END IF
// Ascending or Descending?
IF cbx_asc.checked = TRUE THEN
ls_sortstring = ls_sortstring + "A"
ELSE
ls_sortstring = ls_sortstring + "D"
END IF
Exit
End If
NEXT
End If
Return ls_sortstring
end function
Name
|
Owner
|
systemfunctions.upperbound |
systemfunctions
|