Blaise 4.8

What's New!

Datamodel

Some extensions are available in the Blaise datamodel.
PROCEDURE SqrtFormula
PARAMETERS
   A, B, C, Result: REAL
ALIEN('Tools.MSU', 'SqrtFormula')
ENDPROCEDURE
BLOCK BDoublePunch
FIELDS
  Name "What is your name?" : STRING[20]
  Age "What is your age, ^Name": 0..120
  Gender "What is your gender, ^Name": (male, female)
ROUTER DoublePunch ALIEN('MySetup.msu /KMetaID=Test',
        'DoublePunch')
ENDBLOCK
LAYOUT [ ( LayoutIdentifier ) ]
 [ LayoutSpec [ LayoutSpec ... ] ]
[LAYOUT ... ]

After the reserved word LAYOUT you are now allowed to specify a layout identifier. With the layout identifier you can identify which of the layout sections in the modelib needs to be applied when constructing the pages for the Data Entry Program and the Internet. Having multiple identified layout sections allows you to completely customize your pages for each data collection mode you have.

A small example:

BLOCK Person
FIELDS
  Name "...": STRING[20]
  Age   "...": 0..120
  Gender "...": (male, female)
  Married "...": (yes,no)
  Children "...": (yes,no)
RULES
  ...
LAYOUT (Laptop)
  AFTER Name NEWPAGE
  AFTER Married NEWPAGE
LAYOUT (SelfInterviewing)
  AFTER Age NEWPAGE
ENDBLOCK

In the example the modelib contains two layout sets: Laptop and SelfInterviewing. Page breaks are inserted at different positions in the datamodel depending on the layout set being used.