Populating Dynamic values by referencing previous records in a Multi-Paging subform
We work with a lot of multi-paging subforms. I would like to be able to pass data entered on a previous subform record, to a subsequent subform record in the same element. For example, if a user has collected 30 subform records, I would like to pass data entered on record 29, into a dynamic value on record #30. All the examples I've seen on your site only show how to reference a static record #, such as my_subform_element[0] referencing the first subform, but there needs to be a way to to have an element dynamically reference a previous record, e.g. in record "x" be able to pull data from a field in record "x-1" (or x-5, or whatever).
-
Hey John, great question and I believe what you are looking for is the structure below. Note the part in brackets indicating we want the current length of the subform array minus 1 (to get the previous entry value)
community_parent.child[community_parent.child.index-1].carry_over_value
I put together a form package that demonstrates this behavior if you want to check it out here. Hope that helps, and let me know if that wasn't what you were thinking.
-Tony
Please sign in to leave a comment.
Comments
1 comment