$subtract lists
From UBot Studio
(Difference between revisions)
(Created page with "$subtract lists is a Variable Function. The function returns the first list with all items from the second list removed from it This command allows yo...") |
|||
Line 4: | Line 4: | ||
This command allows you to compare two lists and create a new list containing all | This command allows you to compare two lists and create a new list containing all | ||
− | items that are | + | items that are common in both lists. |
== Example == | == Example == | ||
Line 15: | Line 15: | ||
</pre> | </pre> | ||
− | Using the [[Type text|type text]] function to fill our field with the list items | + | Using the [[Type text|type text]] function to fill our field with the list items that are found in both lists. |
− | + | ||
[[File:subtract.png]] | [[File:subtract.png]] | ||
Running the script returns list items three and four. | Running the script returns list items three and four. |
Revision as of 01:02, 16 October 2012
$subtract lists is a Variable Function.
The function returns the first list with all items from the second list removed from it
This command allows you to compare two lists and create a new list containing all items that are common in both lists.
Example
In this example, the contents of $my list1 is subtracted from the contents of $my list2.
add list to list(%my list1, $list from text("one,two,three,four", ","), "Delete", "Global") add list to list(%my list2, $list from text("zero,one,two,five,six", ","), "Delete", "Global") type text(<about me textarea>, $subtract lists(%my list1, %my list2), "Standard")
Using the type text function to fill our field with the list items that are found in both lists. File:Subtract.png
Running the script returns list items three and four.