GetMetadata$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Retrieves metadata from a table. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

GetMetadata$( table_name, key_name )

table_name is the name of an open table, specified either as an explicit table name (for example, World) or as a string representing a table name (for example, "World").

key_name is a string representing the name of a metadata key.

Return Value

String, up to 239 bytes long. If the key does not exist, or if there is no value for the key, MapInfo Pro returns an empty string.

Description

This function returns a metadata value from a table. For more information about querying a table's metadata, see Metadata statement, or see the MapBasic User Guide.

Example

If the Parcels table has a metadata key called "\Copyright" then the following statement reads the key's value:

Print GetMetadata$(Parcels, "\Copyright")

See Also:

Metadata statement