Page data is PRISM data that gets loaded when a page or template loads from the server. It can be used in the page as live text either direct using the full live text format or by using the body tree format using .items and .header. When using page data in a single file or in a memo field, the text must start with a .data as the first entry. After this you add the data definition. It can we one object or an array of objects. Each object represents one data result from PRISM that will be added to the data result. This set of data can then be added to a page or template body and used for rendering the page.

      "type" : "record",
      "tablename" : "Address"

Simplest form of page data definition making you add queries to the url and return the first address record based on the url query.

      "type" : "record",
      "tablename" : "Order",
      "stoponblank" : true
      "type" : "list",
      "tablename" : "OrderLine",
      "fixedfilter" : "OrderID=[{Order.OrderID}]"

A little more advanced example involving two tables and some ad hock relations using LiveText in the fixed filter for OrderLine. 

We could also add some field lists for including and excluding fields if we wanted, but in this example we want all fields for both tables. If we added include/exclude fields, the include is matched first, then the exclude, so an exclude will always override an include but it we have include fields only these fields will be added and then exclude will be exclude form the include list. This can be of value when using wild cards matching. Default include is * meaning all fields. Default exclude is blank meaning no exclude. 

Valid fields in a data definition

defaults Default values if nothing set in filters or query line. The default values are set by an array of arrays. The inner array should contain only two strings, the field name and the query. Make sure the fields you want to use in a query are included in the includelist or not excluded in the excludelist as only fields in the multiview can be queried.
Ex. "defaults" : [["ID,"*"]] to set a default query all IDs
Ex 2: "defaults" : [["UserName,"test"],["Title","b*"]] to find all records with UserName=test and Title starting on b
Can be used to make a data set with no query values for instance work a all data by setting ["ID" , "*"]. * means mach all. ID must then be a field in the data table. If no query set, no value will be returned, so this can be a way of making sure a "pure" url gets default data.
excludefields A list of fields to exclude or a list of wild cards to match names. Ex ["Body","Temp*"] meaning exclude the Body field and all fields starting on Temp.
fixedfilter Set a filter that will always be used by the query. This filter is applied after the query filter and will override this. This filter can be used to sett security on data and supports LiveText for by looking up data loaded so far in the data load process. Order of loading is: globals, session data (inkl.user), template data and last the page data in the order defined in the JSON. Ex. username=[{user.username}] will only show data for the current logged in user.
includefields A list of field to include or a list or wild cards to be used to match field names. Ex ["B*","Count","Price"] will include the fields Count, Price and all fields starting on B. If the example exclude fields was added as well, the the Body field would not be included since it has a match in the exclude list.
named the name the data is given when returned to a page. If no named set, the default is to use the tablename.
skipvirtualfields can be used to not read virtual fields in datadef in LegEasy Web Connect.
type the method used for returning data. Can be record or list. Record returns the first record and list return all records matching the query.
tablename The table to return data from