📚 SAP Business One SDK Help

SetConditions Method
See Also  Example
pConditions
The conditions for filtering the ChooseFromList

Description

Sets a collection of conditions on the ChooseFromList, in order to filter the valid values displayed to the end user.

The conditions are processed after the before notification of the choose from list event and before the form is displayed.

Syntax

Visual Basic
Public Sub SetConditions( _
   ByVal pConditions As Conditions _
) 

Parameters

pConditions
The conditions for filtering the ChooseFromList

Remarks

Setting conditions removes any previous conditions already set.

Example

Setting conditions (Visual Basic)Copy Code
Dim oCond As SAPbouiCOM.Condition

If oConds.Count > 0 Then 'If there are already user conditions.
    oConds.Item(oConds.Count - 1).Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND
End If

oCond = oConds.Add()
oCond.Alias = "CurrTotal"
oCond.Operation = SAPbouiCOM.BoConditionOperation.co_GRATER_THAN
oCond.CondVal = 0
oCFL.SetConditions(oConds)

See Also