Click or drag to resize

ICriteriaRemoveCriterion Method

Remove the criterion for a regular field. TableAndFieldName parameter is on the format 'tablename.fieldname' Remove a criterion from the collection Find and remove a criterion from the collection

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void RemoveCriterion(
	string TableAndFieldName
)

Parameters

TableAndFieldName
Type: SystemString
The name of the table and field the criterion you want to get searches in ("tablename.fieldname")
Examples

Remove

VB
Dim db As New Database
If db.Login("<username>", "<password>") Then
    Dim selection As SOSelection = db.GetSelection(26)
    'Remove a criterion from the collection 
    Dim criterion As SOCriterion = selection.Criteria.GetCriterion("contact.name")
    selection.Criteria.Remove(criterion)

    selection.Save()
    MsgBox("criterion removed")
Else
    MsgBox("failed to log in")
End If

RemoveCriterion

VB
Dim db As New Database
If db.Login("<username>", "<password>") Then
    Dim selection As SOSelection = db.GetSelection(26)
    'Remove a criterion from the collection 
    selection.Criteria.RemoveCriterion("contact.name")

    selection.Save()
    MsgBox("criterion removed")
Else
    MsgBox("failed to log in")
End If

See Also