Once declared, elements (i.e. row,col,value triplets) can be added to the gridmap with standard two-dimensional array assignment syntax, except for the variation with a string column index:
$table(n, "Description") = "Left-Handed Smoke Shifter" ! string column index
$table(row,col) = 123987 ! numeric row and column indices
As with ORDMAP, if the specified key exists already, the operation will replace the value of the existing element. To delete an element, a special value .NULL ("dot null") is assigned:
$table(row, "SerialNumber") = .NULL
Comments
All values in a gridmap are stored as strings. That doesn't prevent you from assigning a numeric value, as in one of the examples above; but keep in mind that it will behave as a string, i.e. auto-converted in numeric expressions but treated as text in string expressions.
Assigning an empty string (“”) to the value of a key does not delete the item.