Skip to main content
Skip table of contents

RemoveEntry: remove an entry in elements of a list

Tag: RemoveEntry

The RemoveEntry function removes an entry from each element in a list, or from a subset of these elements.

Detailed Description

An entry is the name of a list action parameter in a list element.

For example, in <List Name=”List1” Action=”SetVar” v1=”A” v2=”B”/>:

  • Name and Action are not list action parameters, they are mandatory settings of the List action

  • v1 and v2 are action parameters: they relate to “SetVar“; they are considered list entries in the element defined by the List action and can be removed

An entry can be removed from all elements in the list, or from a subset of elements defined by a WHERE clause.

For example, list A contains 10 elements with entries A and B: B can be removed from all elements, or only from elements that match a WHERE clause that compares entry values in each element to its settings.

The WHERE clause is case insensitive.

Tag Attributes

Attributes

Value Description

ListName

Any string to ID the list (required)

EntryName

Any string to ID the entry (required)

Where

Name of parameter to use for a source list subset selection (optional)

(where comparison mode)

If the Where attribute is used, a comparison mode is required, one of:

  • Begins

  • NotBegins

  • Equals

  • NotEquals

  • Contains

  • NotContains

  • IsInString

  • IsNotInString

  • IsIn

  • IsNotIn

  • Ends

  • NotEnds

  • GreaterThan

  • GreaterOrEquals

  • LessThan

  • LessOrEquals

CODE
<ytriaAutomation>
	
    <SplitIntoSetVarList ListName="List1" separator=":" var1="A:B:C:D:E:F" var2="a:b:c:d:e:f"/>

Remove all var1 from List1
	<RemoveEntry ListName="List1" EntryName="var1"/>
	<Loop list="List1">
		<ExecuteListAction/>
	</Loop>	


    <SplitIntoSetVarList ListName="List2" separator=":" var1="v1:v2:v3:v4:v5:v6" var2="1:2:3:4::A"/>

Remove var1 from List2 for elements that have a var2 value smaller than 3
	<RemoveEntry ListName="List2" EntryName="var1" where="var2" lessThan="3"/>
	<Loop list="List2">
		<ExecuteListAction/>
	</Loop>	

Remove var2 from List2 for elements where var1 value is empty
	<RemoveEntry ListName="List2" EntryName="var2" where="var1" equals=""/>
	<Loop list="List2">
		<ExecuteListAction/>
	</Loop>	
		
</ytriaAutomation>

image-20240405-001328.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.