Inserts logical node with tag <and> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 11.0.0.6296

Syntax

C#
public Item newAND()
Visual Basic (Declaration)
Public Function newAND As Item
J#
public Item newAND()
JScript
public function newAND() : Item

Return Value

Logical "AND" item. Returned item shares dom with this item.

Remarks

Logical item is an item which node references to the "logical" tag, i.e. 'or', 'and' or 'not'. Logical items are used to build request conditions where item's properties serve as condition expressions. User has to use setProperty(...), setPropertyCondition(...) to set condition expressions on logical item (see example below). It's possible to build nested logical request conditions by calling newOR(), newAND() or newNOT() on a logical item.

Examples

CopyC#
...
var myItem = myInnovator.newItem('Foo','get');
var logicalAND = myItem.newAND();
logicalAND.setProperty('foo','bar1');
var nestedOR = logicalAND.newOR();
nestedOR.setProperty('foo2','bar2');
nestedOR.setProperty('foo3','bar3');
//The following line of code is optional because 'eq' is the default property condition:
logicalOR.setPropertyCondition('foo3', 'eq');
...

Exceptions

ExceptionCondition
System..::.Exception If the instance is neither a single regular item (i.e. item referencing <Item> node) nor a logical item.
System..::.ArgumentExceptionthis.node is read-only.

See Also