GetIDField()
Summary
Gets the full field spec of the ID field for a layer.
Syntax
a = GetIDField(string layer_name)
| Argument | Contents |
|---|---|
| layer_name | The name of the layer |
Returns
The full field spec of the ID field for the layer.
Notes
-
If the layer is CDF and has a numeric DATA field, GetIDField() returns that field instead of the KEY field.
-
If layer_name is the view name of a mappable join, the field returned will belong to the join, not the layer (base view).
-
If layer_name is null, returns the ID field for the current layer (base view), not the current view, if it is a mappable join of the layer and hence different from the base view.
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The layer (view) does not exist |
See Also
| Function | Summary |
|---|---|
| GetField() | Returns the view, field name, and field spec for a field |
| GetFieldFullSpec() | Returns a full field spec for a field name |
| GetFields() | Gets a list of the fields in a view |