Set.remove Method [AX 2012]

Removes an element from the set.

public boolean remove(anytype arg)

Run On

Called

Parameters

arg
Type: anytype
The element to remove.

Return Value

Type: boolean
true if the element was found and removed; otherwise, false.

The following example checks whether any of the values in one set, the noConfigs set, are found in a second set, the yesConfigs set. If they are found, they are removed from the yesConfigs set.

Set             noConfigs; 
Set             yesConfigs; 
ConfigId        configId; 
SetEnumerator   se; 
; 
  
se = noConfigs.getEnumerator(); 
while (se.moveNext()) 
{ 
    configId    = se.current(); 
    if (yesConfigs.in(configId)) 
    { 
        yesConfigs.remove(configId); 
    } 
}

Community Additions

ADD
Show: