FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder

FlexPro Documentation 2025

SearchStrings

Searches in a data series for a string and returns the indices of the matches as a data series.

Syntax

SearchStrings(StringSeries, [ String ], [ Operation = SEARCH_OP_IS ] [ , IgnoreCase = FALSE ])

 

The syntax of the SearchStrings function consists of the following parts:

Part

Description

StringSeries

The data series with strings to be searched in which to search for the string.

Permitted data structures are Data series. Supported data types are String.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

String

The string for which to search. If a data series with strings is specified, the result is a list with one list element per string. If you omit the argument, all unique strings of the input data set are searched for and the result is a list with one list element per unique string.

Permitted data structures are Scalar value und Data series. Supported data types are String.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Operation

Determines how the strings are compared.

The argument Operation can have the following values:

Constant

Meaning

SEARCH_OP_CONTAINS

Contains

SEARCH_OP_DOESNOTCONTAIN

Does not contain

SEARCH_OP_IS

Is

SEARCH_OP_ISNOT

Is not

SEARCH_OP_STARTSWITH

Begins with

SEARCH_OP_DOESNOTSTARTWITH

Does not begin with

SEARCH_OP_ENDSWITH

Ends with

SEARCH_OP_DOESNOTENDWITH

Does not end with

SEARCH_OP_MATCHESPATTERN

Matches the specified search pattern. See details Pattern matching when searching for text.

SEARCH_OP_DOESNOTMATCHPATTERN

Does not match the specified search pattern.

SEARCH_OP_CONTAINSPATTERN

Contains the specified search pattern.

SEARCH_OP_DOESNOTCONTAINPATTERN

Does not contain the specified search pattern.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value SEARCH_OP_IS .

IgnoreCase

A Boolean value that specifies whether to ignore the case when performing a search.

Permitted data structures are Scalar value. Supported data types are Boolean value.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value FALSE .

Remarks

The result always has the data type 64-bit integer.

The result is a data series or a list of data series with the indices of the strings found.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Dim names = {"Channel1", "Channel2", "Channel2", "Channel1", "Channel1", "Channel2"}
Dim data = { 1, -1, -2, 2, 3, -3 }
return data[SearchStrings(names, "Channel2")]

Returns all data values assigned to "Channel2" from a protocol.

See Also

StringFind Function

RemoveDuplicates Function