Only valid as the child of a row control, it specifies the contents of a single cell of a table row.
Fields
Field | Description |
---|---|
id |
Identifies the control when it is referenced in data-binding queries, reports, and workflow scripts. |
Traits
Trait | Description |
---|---|
declarations |
A collection of zero or more variable declarations (let elements) that can be referenced in solution-wide query expressions. |
validation |
A collection of zero or more validation rules (validator elements) that evaluate user input in the control at
runtime, and prevent the user from submitting the form if the |
content (required) | Exactly one child control. |
Remarks
The cell
control has a required child control. Only one
child control is allowed, however, composite controls such as popups and table controls count as a single
control.
The scope of the
row template includes the iterator variable named in the record field. This means that when you insert a cell
control into a row template, you can use the iterator variable to access the
fields of the record that is used to populate the current
row.
Figure 229. A basic example of a reference via the iterator variable from inside a
cell
in a row
template
The textview
inside the cell
in the
row
template references the records returned in the
recordset
property via the variable named in record
.
However, since the table
control's header or footer rows are out of the iterator variable's scope, using the iterator
variable in their cell
s to reference the parent table
's
recordset
won't
work.
Sample
<form id='cellSample' menuName='Swell cells' platforms='web' xmlns='http://schemas.mobilengine.com/fls/v1'> <table id="jabber" recordset='{TABLE column_1("brillig")}' record="v"> <header> <row> <cell> <textview text="There's a textview in this one"/> </cell> <cell> <textview text="There's a popup in this one"/> </cell> <cell> <textview text="There's a table in this one"/> </cell> </row> </header> <row> <cell> <textview text='{v.column_1}'/> </cell> <cell> <popup title="Click to see the options"> <checkbox id="checkFoo" label="Select any two" text="Fast" checked='{false}'/> <checkbox id="checkBoo" label="" text="Good" checked='{false}'/> <checkbox id="checkChoo" label="" text="Cheap" checked='{false}'/> </popup> </cell> <cell> <table id="table1" recordset='{TABLE column_1, column_2 ("axolotl", "borscht"; "moxie", "hoohah")}' record='k' > <row> <cell> <textview id="textBoo" text='{k.column_1}'/> </cell> <cell> <textview id="textFar" text='{k.column_2}'/> </cell> </row> </table> </cell> </row> </table> </form>
A workflow script running in the Mobilengine Cloud would access the submission of the webform above in the format below:
{... jabber: { rows: [ { checkFoo: {checked: true}, checkBoo: {checked: true}, checkChoo: {checked: false}, table1: { rows: [ { textBoo: {text: "axolotl"}, textFar: {text: "borscht"} }, { textBoo: {text: "moxie"}, textFar: {text: "hoohah"} } ] } } ] }, ...}
See the workflow script reference guide for more details on data type mapping.