I have a datafield, with predefined answers. Depending on the predefines chosen, I want a certain piece of text to appear and want to enumerate it.
I tried the below, but it did not work: @enumerate-andor({“Pro Rata Tag Along Right” in #subscription-agreement^optional-clauses: Pro Rata Tag Along Right in accordance with §pro-rata-tag-along | “Full Tag Along Right” in #subscription-agreement^optional-clauses: Pro Rata Tag Along Right in accordance §pro-rata-tag-along | “Drag Along” in #subscription-agreement^optional-clauses: the Shares held by the Dragged Parties in the event the transferee would invoke the Drag Along Right})
In this case, another way of performing automatic enumerations would be better suited: {AND | item1 | item2 | item3}.
Your text would look as follows:
{AND | {“Pro Rata Tag Along Right” in #subscription-agreement^optional-clauses: Pro Rata Tag Along Right in accordance with §pro-rata-tag-along} | {“Full Tag Along Right” in #subscription-agreement^optional-clauses: Pro Rata Tag Along Right in accordance §pro-rata-tag-along} | {“Drag Along” in #subscription-agreement^optional-clauses: the Shares held by the Dragged Parties in the event the transferee would invoke the Drag Along Right}}
Each of the items in a {AND | item1 | item2 | item3} will get enumerated automatically, and if conditions are attached to them, will only be shown if those conditions are true. Therefore, the above code will result in an enumeration that only lists items for which your conditions evaluates to true.
Your proposal does not work because a special function cannot directly contain a condition. It would, however, still work if you made each of those items into an internal snippet. But the more suitable way of handling it is using the {AND | … | …} syntax suggested above.