Reference
Setup
Field definitions
10min
field definitions provide a way to expose low level information about the main entities in the ticketmatic applications this allows setup experts and regular users to configure views, ticket layouts and documents without technical knowledge of the public data model views are simply composed by selecting a set of field definitions in ticket layouts all field definitions related to the ticket and order are available in documents all field definitions related to the order are available field definitions always belong to one of the main entities in ticketmatic contact event ticket payment field definitions are managed in the field definitions module in the settings app click the button below to go there basic example let's try a basic example press add in the contact tab to create a new field definition field definition enter this configuration name the visible name for the field, use 'first name' key the key to reference the field in ticket layouts or documents, use 'firstname' display select how the field should be displayed use 'string' width default width of this field in views, use 40 variable width whether the field should be resized in views when necessary, check it alignment the field alignment the definition field should contain the actual sql clause for example, to display the first name of the contact contact firstname the preview result section will display a few sample results in real time save the field definition this definition is now ready to be used in views docid\ kfyzmnbmfvgyj6x0pkhcx , ticket layouts docid\ w9n qrlgqo5qxo mey7 d and documents docid\ gczf4ohu7omfvriqxraef definition you use the public data model https //www ticketmatic com/docs/db to define field definitions a field definition is actually an sql select clause depending on the entity the field definition belongs to, the main sql table will be different for example, for field definitions of type contact , the main table is tm contact https //www ticketmatic com/docs/db/contact you can use any supported sql function in the definition for example, to put the first name in upper case upper(contact firstname) you can use subqueries as well for example to create a field definition for the number of orders for a contact (select count( ) from tm order where tm order contactid=contact id) as nbroforders joins depending on the field definition type, certain joins can be activated for example, if you want to create a field definition for the address for a contact, you can use following definition \<needed tag="address"/>contactaddress city bij specifying the needed tag, you activate the join below is the list of joins that can be activated contact join table that becomes available address tm contactaddress phone1 tm contactphonenumber phone2 tm contactphonenumber phone3 tm contactphonenumber customertitle tm contacttitle order join table that becomes available saleschannel tm saleschannel customer tm contact, tm contactaddress and tm contactphonenumber paymentscenario tm paymentscenario deliveryscenario tm deliveryscenario event no optional joins are available, but eventlocation and production are always available automatically ticket join table that becomes available basket tm order event tm tickettype and tm event pricetype tm tickettypeprice and tm pricetype buyer tm contact (as buyer) ticketholder tm contact (as ticketholder) seat tm seatrank deliverystatus deliverystatus deliveryscenario tm deliveryscenario locktype tm locktype payment join table that becomes available basket tm order paymentmethod tm paymentmethod user tm user for more examples, take a look at the field definitions that by default are available in your account