A container that allows the declaration of the variables defined by its one or more let element children.
Copyright © 2016 Mobilengine Corp. All rights reserved. version: 7.0.4.19927
A container that allows the declaration of the variables defined by its one or more let element children.
Remarks
declarations is allowed as a trait of any control, but must be the very
first child element if present.
Sample
...
<declarations>
<let id="scalarLet"
shape="scalar"
value='{boxR.text||" , "||boxQ.text }'/>
<let id="recordLet"
shape="record"
value='{TABLE pitter, patte
(boxQ.text, boxR.text)}'/>
<let id="tableLet"
shape="table"
value='{TABLE patter
(boxQ.text;
boxR.text)}'/>
</declarations>
<textbox id="boxQ"
label="Enter a word or two"
text=""/>
<textbox id="boxR"
label="Enter some more text"
text=""/>
<textview label="You entered: "
text='{scalarLet}'/>
<dropdown choices='{TABLE pitter, patter, potter
(boxQ.text, boxR.text, "Goo!";
"axolotl", "moxie", "Boo!")}'
keyMap='{SELECT pitter, patter}'
textMap='{potter}'
selectedKey='{SELECT recordLet.pitter pitter,
recordLet.patter patter}'/>
<table id="tableK"
recordset='{SELECT d.patter
FROM tableLet d}'
record="f">
<row>
<cell>
<textview text='{f.patter}'/>
</cell>
</row>
</table>
...
All
possible types of let elements declared inside a
declarations trait
A workflow script running in the Mobilengine Cloud would access the submission of the webform above in the format below:
{...
boxQ: {text: "giant"},
boxR: {text: "shrimp"},
selectedKey: {pitter: "giant", patter: "shrimp"},
selectedText: "Goo!",
selectedValue: {pitter: "giant", patter: "shrimp", potter: "Goo!"},
scalarLet: "shrimp , giant",
recordLet: {pitter: "giant", patter: "shrimp"},
tableLet: [{patter: "giant"}, {patter: "shrimp"}],
...}See the workflow script reference guide for more details on data type mapping.
