$common list items

From UBot Playground
Jump to: navigation, search

$common list items is a Data Function. This function allows you to compare two lists and return a list containing all items that are common to both lists.

This function works in the opposite way that the subtract list function works.

Instead of comparing two lists and finding items only unique to the first list, it finds list items common to both lists.

List 1: First populated list.

List 2: Second populated list.


clear list(%list2)
clear list(%list1)
add list to list(%list1, $list from text("a,b,c,d", ","), "Delete", "Global")
add list to list(%list2, $list from text("a,b,x,v", ","), "Delete", "Global")
type text(<about me textarea>, $common list items(%list1, %list2), "Standard")


Running the script above should return only items a and b in the field that will be filled. List items a and b are common to both lists.