Referencing the triggering record's own fields
For fields from the record that fired the Workato recipe, use Formstack's standard merge syntax — the field name preceded by a dollar sign, wrapped in curly braces:
{$Name}Referencing child records
Child records need a bit more setup, because of how Workato passes list data to Formstack.
1. In your Workato recipe, before merging the document, add a "Create List" action using the Variables by Workato app. In that action, define a list and add the fields you want to pull from the child records. Keep these field names to a single word, ideally camelCase (e.g. fieldName) — Formstack can have trouble with underscores or spaces in field names, so simple names avoid that entirely.
Note: the field names you define here are your own Workato list variable's field names — they don't have to match (and often won't match) the actual field names as they exist in TrackVia. You'll still map the real TrackVia field values into these list fields using data pills from your repeat/child-view action step; the list variable's field names are just what you'll reference in the template.
2. In your Formstack template, wrap your child-record fields in a tablerow block:
{tablerow from=$childRecords item=_row}
{$_row.Name}
{/tablerow}childRecordsis the name of the list variable you created in step 1 (you can name it whatever you like).item=_rowis required as written —itemmust be called out exactly like that.- Each child field is then referenced as
{$_row.FieldName}, whereFieldNamematches a field name from your Workato list variable (not necessarily the TrackVia field name). - Close the block with
{/tablerow}after your last child field.
Mapping the Merge Document action
On the Merge Document action using your custom Formstack/WebMerge connector, map all your regular data pills as usual, and place the data pill for your list variable into the Child records field.
Important: leave the Record and Row fields empty — you do not need to map anything into them for this to work.
Comments
0 comments
Please sign in to leave a comment.