Copy List with Restrictions

Verb: listConstrainedCopy

Available from: <Standard>

Copies items from one list to another, initiating from a starting position until it reaches the specified number of items.


listConstrainedCopy --target(List<Variant>) --start(Numeric) --length(Numeric) --collection(List<Variant>)


Script Designer Required AcceptedTypes Description
--target Target List Required List<Any> List that receives the items copied from the list inserted in the Source List parameter.
--start Index Required Number Position from which to copy items.
--length Itens Quantity Required Number Number of items to copy to the list in the Target List parameter.
--collection Source List Required List<Any> List containing items that can be copied to the list in the Target List parameter.


The Copy List with Restrictions command copies three items from the "sourceList" variable to the "targetList" variable, starting at index "2" of "sourceList".

defVar --name sourceList --type List --innertype String --value "[Ana,Maria,Lucia,Cristian,Lucas,Carlos]"
defVar --name targetList --type List --innertype String
listConstrainedCopy --target "${targetList}" --start 2 --length 3 --collection "${sourceList}"
logMessage --message "Copied Items: ${targetList}." --type "Info"
// Copied Items: [Maria,Lucia,Cristian].


The content of the lists entered in the Target List and Source List parameters must be of the same type.

The values defined in the Index and Itens Quantity parameters must be between "0 and 2147483647".

The starting position and number of items copied must be in range of the number of items in the list entered in the Source List parameter.

See Also

  • Remove From List