Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

wcFindItem() Function

  • Last UpdatedNov 23, 2018
  • 1 minute read

Determines the corresponding position of the first item in the list box or combo box that matches the supplied message string.

Category

windows control

Syntax

[ErrorNumber=]wcFindItem ("ControlName", "MessageTag", CaseSens, Tagname);

Parameters

ControlName

The name of the windows control object. For example, ListBox_1. Actual string or message tagname.

MessageTag

The message string to be compared. Actual string or message tagname.

CaseSens

Determines the type of the string comparison. It can either be a discrete value or tagname. The following values are valid:

0 = case-insensitive.

1 = case-sensitive.

Tagname

Integer tag into which the position of the matching item is returned. If no matching item is found, -1 is returned.

Remarks

For a list of returned error numbers, see Understand windows controls error messages.

Applies To

List boxes, combo boxes

Example(s)

Assuming that ListBox_1 is a list box that contains "ItemA", "ItemB", and "ItemC", the function returns the following values into Result:

wcFindItem("ListBox_1", "ItemB", 0, Result);

returns 2

wcFindItem("ListBox_1", "Itemb", 1, Result);

returns -1

wcFindItem("ListBox_1", "itemc", 0, Result);

returns 3

wcFindItem("ListBox_1", "XYZ", 0, Result);

returns -1

In This Topic
TitleResults for “How to create a CRG?”Also Available in