IsMember()

Summary

Tests whether a record is a member of a selection set.

Changes

Added to Version 5.0.

Syntax

answer = IsMember(string set_name, string row_handle)

Argument Contents
set_name The selection set to test
row_handle The record handle of the record to test

Returns

A string, "True" if row_handle is a member of the selection set, otherwise "False".

Example

//Open BDOCUMENTS\CALIPER\\< product name>\TUTORIAL\NElayers.wrkz
tutorial_folder = RunMacro("G30 Tutorial Folder")
wrkz = OpenWorkspace(tutorial_folder + "NElayers.wrkz")set_name = "Selection"
row_handle = "4465"
answer = IsMember(set_name, row_handle)
ShowMessage("It is " + answer + " that the record with the handle " + row_handle +
" is in the " + set_name + " set")
// Create a formula field that indicates which records are in set Selection
If IsMember("Selection", GetRecord() ) then "Selection" else ""

Notes

  • IsMember() returns "False" if row_handle does not exist.

  • IsMember() can be used in formulas, to do different things for different selection sets.

  • For more information on GISDK functions for combining or reorganizing selection sets, such as SetAND(), see Selection Sets.

Error Codes

Error Type Meaning
Error There are missing arguments
NotFound The selection set was not found

See Also

Function Summary
GetRecord() Gets the record handle of the current record of a view
GetRecords() Gets an array of record handles for a selection set