By David Crowther
Question:
What is the purpose of the COLUMN DATA TYPE option in the MapThat Admin Forms?
Answer:
The COLUMN DATA TYPE is a tickable option within the MapThat Admin Forms > Information Bubble settings
It has three options to choose from:
- STRING
- DATE
- INT
1 – Primarily it is used to allow MapThat to determine how to SORT records when the records are displayed in the DATA TABLE.
For example, you may have a House Number field in your source data that contains numbers e.g. 1,2,3,4 etc… and you wish to ORDER the records in your TABLE based on that field. If you leave the COLUMN DATA TYPE as String, when ordering records using the House Number, it will order all records in alphabetical order beginning with any records starting with 1 first, then once all records starting with 1 are shown, it will move onto records starting with 2.
e.g.
1
11
111
12
13
2
22
3
33
4
44
444
4444
5
…etc…
However, by defining the COLUMN DATA TYPE for this field to be INT, MapThat will know that the source data is numeric (integers) and so will order the records in numeric order.
e.g.
1
2
3
4
5
……. 11,12,13 etc….
2– In addition, the COLUMN DATA TYPE helps to tell MapThat how to write any edits made to cells (made via the DATA TABLE) back to the source database table.
For example, is that source field a DATE value or Integer or maybe String?
The rules for both SQL and PostGIS databases, are shown below:
- If the source data is DATE or DATETIME – choose COLUMN DATA TYPE = DATE
- If the source data is INTEGER – choose COLUMN DATA TYPE = INT
- If the source data is any other type e.g., String, Character Varying, Float, Double Precisions etc… – choose COLUMN DATA TYPE = STRING
MapThat will determine how to write all records successfully back to the source data if you choose String. It essentially does the conversion on the fly from STRING to the database table field type.
Comments (0 comments)