Sorry, we don't support your browser.  Install a modern browser

Create next item conditions that are controlled by questions outside the repeating item list#182

W

I would like the ability to create conditions within next item repeating lists that are controlled by logic from other workflow questions outside of that specific repeating item list.

For example, our office is coding a new Will document that includes a section which appoints guardians to take care of our client’s children after they die:

“If I should die before all of my children reach the age of majority, I appoint [Guardian1] to have custody of my minor children. (next item logic starts here) In the event that [Guardian1] does not survive me, I appoint [Guardian2] to have custody of my minor children. (next item logic ends here)”

It works fine as is, but if we’re doing Wills for a married couple then the first sentence changes to “If my spouse, [Spouse], and I should die…”, and all instances of “my minor children” becomes “our minor children”.

This causes a problem when I get into the next item list logic, because there’s currently no syntax available that can be triggered by workflow answers located outside of its specific repeating item list page. Therefore, I’m unable to tell it to use the question that states how many clients we’re doing Wills for to trigger between “my/our” because it’s outside of the repeating item page for guardians.

While this instance is a fairly minor inconvenience and can be easily adjusted with some grammar changes on our end, I can see how this would be limitting in the future for anyone wanting to do extremely complex coding that pulls information from multiple different sections of the workflow.

3 years ago
?

Thank you for this wishlist item!

In the meantime, you could accomplish this by using the syntax below, just for the section that covers the my/our text. Instead of using nextitem syntax, it repeats the guardian information using a different looping method.

{% set children_possessive = “my” if not IsMarried else “our” %}

If {% if not IsMarried %}I{% else %}my spouse, and I{% endif %} should die before all of {​{​ children_possessive }} children reach the age of majority, I appoint {​{​ Guardians[0].GuardianName }} to have custody of {​{​ children_possessive }} minor children.{% if Guardians|length > 1 %} {% for Guardian in Guardians[:-1] %}In the event that {​{​ Guardian.GuardianName }} does not survive me, I appoint {​{​ Guardians[loop.index0 + 1].GuardianName }} to have custody of {​{​ children_possessive }} minor children.{% endfor %}{% endif %}

3 years ago
W

Dear Anonymous,

At that point, I don’t think the effort needed to get all that code set up would be worth it for a single pronoun change.

3 years ago