search( search_text, within_text, start_num )
Searches the text for the given, case insensitive substring. Returns the one-based positional index of the first character of the first match. Returns zero if the substring is not found.
Keyword | Type | Description |
---|---|---|
|
Text |
The text that will be searched for. |
|
Text |
The text that will be searched in. |
|
Number |
The index of the first character within the within_text value from which to start searching. 1 by default. |
Number
The search_text parameter does not support wildcard characters.
The first character of the entire within_text value is considered to have an index = 1.
1
search("to", "boston")
Returns 4
.
1
search("ne", "boston")
Returns 0
.
1
search("o", "boston", 4)
Returns 5
. The function starts searching the string at index 4.
1
search({ "t", "i" }, { "boston", "paris" })
Returns { 4, 4 }
.
1
search("o", "boston", { 1, 3 })
Returns { 2, 5 }
. The search is repeated at each start index in the list.
1
search({}, "boston")
Returns {}
.
1
search("o", "boston", "")
Returns 0
. The function always returns 0 when given an empty string start_num.
Feature | Compatibility | Note |
---|---|---|
Portals | Compatible | |
Offline Mobile | Compatible | |
Sync-Time Custom Record Fields | Compatible | Can be used to create a custom record field that only evaluates at sync time. |
Real-Time Custom Record Fields | Incompatible | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Compatible | |
Process Events | Compatible |
search() Function