Cities
See also: Addresses
The ‘City’ (City) entity type is used to manage master data for location details that are automatically used to look up information when editing Addresses in the context of the Lobster Data Platform (for details, see ‘Look up locations in addresses’ below).
The Cities menu item can be found in the Main menu in the ‘Administration/Master data’ menu node, provided sufficient permissions are available. It opens a combined view for the ‘City’ (City) entity type.
View name: de.lobster.scm.base.address::City|listDetailsWindow
Menu node name: admin/masterData/cities
Access to Cities is controlled by the permissions for the ‘Administration/MasterData/Cities’ node (administration/masterData/cities).
► IMPORTANT ◄
Although an ‘owner’ (ownerId) is formally identified for each entity of the type ‘City’ ( City ) , there are effectively no owner restrictions for this entity type.
The look-up function and access to city entities via the Such API is completely unrestricted and not tied to an explicit permission to ‘read’ (read) the Role of session .
The ‘Display’ permission controls whether the menu item for Cities appears in the Main menu , via which the overview can be opened.
Other permissions (create, change, delete, etc.) control access to corresponding generic functionalities for Cities , regardless of whether they are displayed in a view or how it was opened.
Overview for ‘Cities’
►NOTE◄ Custom overviews and Input forms are not supported for Cities.
The following screenshot shows the default overview with sample data:
Data model of the ‘City’ entity
Localisation |
Data field |
Type |
Transfer to Addresses |
Contents |
Example |
ID |
id |
Long |
n/a |
Primary key for the City entity |
54321 |
Created |
created |
Timestamp |
Time when the entity was first saved |
2025-05-27T09:57:08.639+02:00 |
|
Creator |
creatorId |
Long |
Reference to the creator (user/guest user) |
4711 / -4711 |
|
Last modified |
lastModified |
Timestamp |
Time at which the entity was last updated |
2025-05-27T12:34:56.790+02:00 |
|
Last modifier |
lastModifierId |
Long |
Reference to the creator of the last update (user/guest user) |
4711 / -4711 |
|
Owner |
ownerId |
Long |
Reference to the owner of the entity (company account) |
123 |
|
Country* |
country |
'country' (countryCode) |
Reference to an enumeration value (see Enumerations) of the Country type |
‘Switzerland’ (CH) |
|
Place name* |
placeName |
String |
‘City’ (city) |
Plain text for the name of a city |
Vessy |
Postal code* |
postalCode |
String |
'Zip code' (zipcode) |
Plain text for the postcode of a city |
1234 |
State |
state |
String |
'State province' (stateProvince) |
Plain text for the name of a sub-area directly below the Country level |
Genéve |
State code |
stateCode |
String |
‘State code’ (stateCode) |
Identification of a sub-area directly below the Country level |
GE |
County* |
county |
String |
n/a |
Plain text for the name of a sub-area directly below the State level |
Geneva |
County code* |
countyCode |
String |
Identification of a sub-area directly below the State level |
2500 |
|
Community |
community |
String |
Plain text for the name of a sub-area directly below the County level |
Veyrier |
|
Community code |
communityCode |
String |
Identification of a sub-area directly below the County level |
6645 |
|
Latitude |
latitude |
Double |
Geographical latitude as a decimal number in degrees (±90°) with north (>0) and south (<0) |
46.1831 |
|
Longitude |
longitude |
Double |
Geographical longitude as a decimal number in degrees (±180°) with east (>0) and west (<0) |
6.1668 |
|
Accuracy |
accuracy |
Integer |
Number of decimal places for the geocoordinates (Latitude, Longitude) |
4 |
*) The asterisk (*) in the localisation indicates fields that are indexed in the database and should therefore preferably be used for Restrictions (see Search API).
Look up cities in addresses
►NOTE◄ The Lobster Data Platform does not provide any data for Cities by default. The example for the Batch import demonstrates the import of such data from a public data source (www.geonames.org).
As soon as one of the address fields City (city) or Zip code (zipcode) is changed when editing details for Addresses in a data input form (e.g. for Users, Companies/Clients or Address book entries), a Search for Cities starts automatically, which takes into account the entry in the changed field and any selection made for the Country code (countryCode) address field.
|
|
▼ |
▼ |
|
For the City (city) or Zip code (zipcode) address fields, a dropdown appears that lists Cities whose ‘Place name’ (placeName) or ‘Postal code’ (postalCode) begins with the character string entered.
It does not matter whether the entry is made for the Zip code or the City address field in the input form. It is therefore also possible to start entering the name of a city in the Zip code address field (see example above right).
A selection in the Country code (countryCode) address field acts as a restriction for the dropdown. Unchanged content for the City (city) or Zip code (zipcode) address fields, on the other hand, has no effect on the results in the dropdown:
|
|
|
When selecting a result from the dropdown, the values for 'Country’, ‘Postal code’, ‘Place name’, ‘State’ and ‘State code’ are transferred from the city list to the corresponding address fields (see ‘Transfer to Addresses’ column in the table above).
►IMPORTANT◄ The transfer of Cities data to address fields affects all address fields mentioned, regardless of whether they are represented by a Text field element in the data input form or not. Existing values for these fields are overwritten or even deleted if there is no value for the selected ‘City’ (City).