TransactField AppThis topic is related to TransactField App. | Deprecated in 21.11 This feature was deprecated in 21.11.
TransactField App allows you to configure form tiles and data extracts from forms. Form tiles custom information is useful for faster navigation, filtering and sorting of saved tasks, forms and history items, especially when there are many items. This is mostly accomplished from Journey Manager. You can configure TransactField App to achieve the following.
To show a custom field on a TransactField App tile from a form:
TransactField App needs to know what is available and how it should be displayed in the form tiles
[
{
"formCode" : "avoka-showcase-form5",
"views" : [{
"type" : "saved",
"fields" : [{
"label" : "My Email",
"value" : "formDataMap.email"
}]
}]
}
]
This will download data extract rules and the tiles.json
to device.
Date fields need special handling as they are encoded in XML in a fixed format. To display them in more user friendly format follow these steps:
tiles.json
to display the new field on the tile, for example a Visit Date label, as shown below[
{
"formCode" : "avoka-showcase-form5",
"views" : [{
"type" : "saved",
"fields" : [{
"label" : "My Email",
"value" : "formDataMap.email"
}, {
"label" : "Visit Date",
"value" : "formDataMap.date",
"dateFormat" : "EEE, d MMM yyyy"
}]
}]
}
]
dateFormat
field specifies date format string, which is similar to Java's SimpleDateFormat.TransactField App shows a form name in the title by default . You can change it with an expression in tiles.json
file by adding the following line "title" : "Customer {{formDataMap.email}} visited on {{formDataMap.date|date:'EEE, d MMM yyyy HH:mm:ss '}}"
.
[
{
"formCode" : "avoka-showcase-form5",
"views" : [{
"type" : "saved",
"title" : "Customer {{formDataMap.email}} visited on {{formDataMap.date|date:'EEE, d MMM yyyy HH:mm:ss '}}",
"fields" : [{
"label" : "My Email",
"value" : "formDataMap.email"
}, {
"label" : "Visit Date",
"value" : "formDataMap.date",
"dateFormat" : "EEE, d MMM yyyy"
}]
}]
}
]
hiddenFields
in the tiles.json
, as shown below.view
in the tiles.json
, as shown below.hiddenFields
in the tiles.json
.tiles.json
file for each form, multiple view types can be specified. If a view without type exists, it will be used as default for all views. Any subsequent views will override the default.dateFormat
for fields and also for titles (see tiles.json example)Detailed Example of the tiles.json
file
[
{
"formCode" : "transact-showcase-fm",
"views" : [{
"title" : "Saved title: Customer {{formDataMap.deliveryEmail}} visited {{formDataMap.myDate|date:'EEE, d MMM yyyy HH:mm:ss Z'}}",
"type" : "saved",
"fields" : [{
"label" : "Delivery Email",
"value" : "formDataMap.deliveryEmail"
}, {
"label" : "Form Name",
"value" : "submission.formName"
}, {
"label" : "Visit Date",
"value" : "formDataMap.myDate",
"dateFormat" : "EEE, d MMM yyyy HH:mm:ss Z"
}, {
"label" : "Address",
"value" : "formDataMap.address"
}],
"hiddenFields" : ["Last Modified", "Status", "Attachments", "Submitted"]}, {
"title" : "Task title Customer visited {{formDataMap.myDate|date:'dd MM yyyy'}}",
"type" : "history",
"fields" : [{
"label" : "Delivery Email",
"value" : "formDataMap.deliveryEmail"
}, {
"label" : "Form Name",
"value" : "submission.formName"
}, {
"label" : "Visit Date",
"value" : "formDataMap.myDate",
"dateFormat" : "dd.MM.yyyy"
}, {
"label" : "Form Version",
"value" : "form.currentVersionNumber"
}
],
"hiddenFields" : ["Last Modified", "Status", "Attachments", "Submitted"]
}]
}
]
You can hide the following fields:
[
/**drafts*/
"Last Modified",
"Organization",
"Status",
/**tasks*/
"Scheduled",
"Complete By",
"Assigned To",
"Created",
"Address",
"Latitude/Longitude",
"Message",
/**history*/
"Processing Status",
"Status Updated",
"Reference number",
"Attachments",
"Total Payment",
"Submitted",
"Completed"
]
Next, learn how to use TransactField App.