|
of_getvalue
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_getvalue
|
Access
|
protected
|
Extend of
|
string
|
Return value
|
string
|
Prototype
|
protected function string of_getvalue(long,string)
|
Name
|
Datatype
|
ls_string
|
String
|
protected function string of_getvalue (long al_row, string as_column);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetValue
//
// Access: Protected
//
// Arguments:
// al_row: The row for which the value is desired.
// as_column: The columnname for which the value is desired.
//
// Returns: String
// The value in passed row/column formatted for use in
// datawindow expressions.
//
// Description: Extracts the data from the master's row and column, properly
// formatted for use in datawindow expressions.
//
// *Note: This function is not typically called by the developer.
// Used internally to refresh subordinate datawindows.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.02 Replaced of_GetItem(...) call with of_GetItemAny(...) to get the column
// data from the master.
// 5.0.03 Added Quote to date, datetime, and time strings.
// 6.0 Function is no longer used by service. Obsoleted.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_string
// Verify passed arguments.
If al_row<=0 or Len(Trim(as_column))=0 or IsNull(as_column) Then Return ""
If al_row > idw_master.RowCount() Then Return ""
// Verify that master has linkage service available.
If IsNull(idw_master.inv_Linkage) Or &
Not IsValid (idw_master.inv_Linkage) Then Return ""
// Get the string value.
ls_string = string( idw_master.inv_Linkage.of_GetItemAny (al_row, as_column) )
// Wrap the string with datatype conversion functions, so that
// the value is valid in Filter and Find expressions.
// Note: a number value does not need any special handling.
Choose Case Lower ( Left ( idw_master.Describe ( as_column + ".ColType" ) , 5 ) )
Case "char("
// CHARACTER DATATYPE
ls_string = "'" + ls_string + "'"
Case "date"
// DATE DATATYPE
ls_string = "Date('" + ls_string + "')"
Case "datet"
// DATETIME DATATYPE
ls_string = "DateTime('" + ls_string + "')"
Case "time", "times"
// TIME DATATYPE
ls_string = "Time('" + ls_string + "')"
End Choose
Return ls_string
end function
Name
|
Owner
|
datawindow.describe |
datawindow
|
datawindow.rowcount |
datawindow
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.left |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
pfc_n_cst_dwsrv.of_GetItemany |
pfc_n_cst_dwsrv
|