|
of_SetReqColumn
|
|
Full name
|
pfc_u_dw.of_SetReqColumn
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_SetReqColumn(boolean)
|
public function integer of_SetReqColumn (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
// Public Function: of_SetReqColumn
// Arguments: boolean
// true - Start (create) the service
// false - Stop (destroy ) the service
// Returns: Integer - 1 if Successful operation, 0 = No action taken and -1 if an error occured
// Description: Starts or stops the Required Column Service.
// This service allows users to Tab/Click out of Required fields without entering any data.
//
// Through the DataWindow ItemError Event the service (if appropriate) will replace an empty
// string with a null value and surpress the standard DataWindow "Value Required For This Item Message".
// The one requirement for this behavior is that the RequiredField is also set to accept "empty string
// as a null". The end result of this action is that an user can click or Tab out of a Required field
// without first having to enter data in it. Note: The RowStatus and ItemStatus of the field is not
// affected/changed by the service.
//////////////////////////////////////////////////////////////////////////////
// Rev. History Version
// 5.0 Initial version
//////////////////////////////////////////////////////////////////////////////
// Copyright © 1996-1999 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.
//////////////////////////////////////////////////////////////////////////////
// Check arguments
if IsNull(ab_switch) then return FAILURE
if ab_Switch then
if IsNull(inv_ReqColumn) or not IsValid (inv_ReqColumn) then
inv_ReqColumn = Create n_cst_dwsrv_reqcolumn
inv_ReqColumn.of_SetRequestor(this)
return SUCCESS
end if
else
if IsValid (inv_ReqColumn) then
Destroy inv_ReqColumn
return SUCCESS
end if
end if
return NO_ACTION
end function