GELLO can query a database. This example will show some some code that queries a database for a postcode based on a given locality. This page will then show it in use in an archetype.
Here is some code for this:
Let retrievedSuburbName: String = 'Bray Park' -- this will be the entered Suburb or locality
Let retrievedStateName: String = 'NSW' -- this will be the entered State
Let postcodeTable: Sequence(TBL_csv)= csv
Let selectedRowOrRows: Sequence(TBL_csv) = postcodeTable->select((Suburb_locality = retrievedSuburbName)
and (State = retrievedStateName))
Let postcodeAsInteger: Integer = selectedRowOrRows.Postcode ->flatten()->last()
Let result: Real = postcodeAsInteger.oclAsType(Real)
DB_Postocdes in this case is a csv file. The MO Gello Authoring tool will also load SQL Lite file and Firebird files.