This article will cover the syntax of the ‘Untag’ regular script statement

This statement is used to remove specific tags from fields or tables.

Statement syntax

Untag [field | fields | table] [fieldlist | tablelist] [with | using] [tagname | mapname];

Field | Fields | TableA keyword specifying what the tags are to be removed from. Field and fields can be used interchangeably.
Fieldlist | TablelistA comma separated list of fields or tables from which the tags are to be removed.
With | UsingA keyword to specify the type of tag. If you are using a single tag, use ‘with’. If you are removing multiple tags using a previously created map, use ‘using’.
Tagname | MapnameName of the specific tag or a mapping table containing a list of tags to be removed.

Example

A table is loaded and all fields are tagged using a map. A single field is untagged leaving the remainder tagged.

ITEM_DETAILS:
LOAD 
	id,
  	cost, 
  	type, 
  	flavour
FROM [lib://Public:DataFiles/ITEM_DETAILS.qvd] (qvd);
TAG_MAP:
MAPPING LOAD * INLINE [
  a,b
  id, identify
  cost, monetary
  type, string
  flavour, string
];
Tag fields using TAG_MAP;
Untag field id with identify;

Result

The table is loaded and all fields apart from the ‘id’ field have tags as specified within the mapping table ‘TAG_MAP’.