Click or drag to resize

DataWindow.SetSelectiveRelation Method (Typed)

X#
Set a selective relation from this window to the child window, or actually from the server of this window to the server of the other window. A selective relation is one that limits operations on the child server to those records that match the relation condition.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD SetSelectiveRelation(
	oDWChild AS DataWindow,
	uRelation AS USUAL,
	cRelation AS STRING
) AS USUAL
Request Example View Source

Parameters

oDWChild
Type: DataWindow
The window attached to the child server; which must be a data window linked to a server of compatible type. If omitted, all relations for this server are removed (although the recommended way of doing this is the DataWindow:ClearRelations() method).
uRelation
Type: Usual
The relation code block for the server, The name or symbol representing the field from this server; a code block is constructed and macro-compiled or the array of field names or symbols representing the relation for the server. The field names are concatenated with plus signs and formed into a code block which is macro-compiled.
cRelation
Type: String
When the relation is specified as a code block, a string version of the code block can be provided as well; it is returned by the Relation() method.

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
Tip Tip
This operation may not be supported, depending on whether the servers used supports relations and are of compatible types.
Examples
The API can take these forms:
X#
1oDWCustomer:SetSelectiveRelation(oDWOrders, {||_FIELD->CustNo},"CustNo")
2oDWCustomer:SetSelectiveRelation(oDWOrders, #CustNo)
3oDWCustomer:SetSelectiveRelation(oDWOrders, {#LastName,#Initial,#FirstName})
See Also