Contains
(Created page with "This function is a Qualifier Function. This functions returns whether or not the text contains the search text. Text refers to the list, variable, ta...") |
(→Example) |
||
| (4 intermediate revisions by one user not shown) | |||
| Line 2: | Line 2: | ||
This functions returns whether or not the text contains the search text. | This functions returns whether or not the text contains the search text. | ||
| − | Text refers to the list, variable, table cell or text you are evaluating. | + | '''Text:''' refers to the list, variable, table cell or text you are evaluating. |
| − | Text to Search For refers to the text that is being search for in the list, variable, table cell or text. | + | '''Text to Search For:''' refers to the text that is being search for in the list, variable, table cell or text. The function also accepts variables and functions such as [[$next list item]], [[$list item]], [[$random list item]], [[$previous list item]], and [[$table cell]]. |
== Example == | == Example == | ||
| Line 20: | Line 20: | ||
</pre> | </pre> | ||
| + | |||
The contains qualifier evaluates the contents of the list %my list and checks to see if the text "Orange exists". | The contains qualifier evaluates the contents of the list %my list and checks to see if the text "Orange exists". | ||
| Line 25: | Line 26: | ||
Since the text "Orange" does not exist int he list, the else command runs. | Since the text "Orange" does not exist int he list, the else command runs. | ||
| − | [[File: | + | |
| + | [[File:containsa.jpg]] | ||
<pre> | <pre> | ||
| Line 43: | Line 45: | ||
This script will be searching for the word "Apple" within the list. Since the word "Apple" exists in the list, the then command runs. | This script will be searching for the word "Apple" within the list. Since the word "Apple" exists in the list, the then command runs. | ||
| − | [[File: | + | |
| + | [[File:containsb.jpg]] | ||
Latest revision as of 18:20, 29 September 2013
This function is a Qualifier Function. This functions returns whether or not the text contains the search text.
Text: refers to the list, variable, table cell or text you are evaluating.
Text to Search For: refers to the text that is being search for in the list, variable, table cell or text. The function also accepts variables and functions such as $next list item, $list item, $random list item, $previous list item, and $table cell.
[edit] Example
add list to list(%my list, $list from text("Apple,Banana,Plum,Persimmon", ","), "Delete", "Global")
if($contains(%my list, "Orange")) {
then {
navigate("google.com", "Wait")
}
else {
navigate("ubotstudio.com/resources", "Wait")
}
}
The contains qualifier evaluates the contents of the list %my list and checks to see if the text "Orange exists".
Since the text "Orange" does not exist int he list, the else command runs.
add list to list(%my list, $list from text("Apple,Banana,Plum,Persimmon", ","), "Delete", "Global")
if($contains(%my list, "Apple")) {
then {
navigate("google.com", "Wait")
}
else {
navigate("ubotstudio.com/resources", "Wait")
}
}
This script will be searching for the word "Apple" within the list. Since the word "Apple" exists in the list, the then command runs.

