Using a placeholder to change a predefine in Q&A

We received the following question from one of our clients and thought the answer might be useful for other members of the forum too:

As I was creating a Q&A, I used a placeholder to change the predefine of a question. It all works fine when simulating the Q&A. However, the problem is that the changes are not reflected in the document. Please see the screenshots below for reference.

This is my card, with two questions on it.
image

The placeholder in the second question should be replaced with the answer to the first question. This is reflected in this change set.
image

This works fine when the Q&A is being simulated.
image

But in the document, the placeholder is still shown.
image

How do I fix this?

Instead of inserting the placeholder within the value of a predefine, you should insert it into the label. But you are correct that the placeholder will actually transpire to the document and is not replaced. However, this is not a “design-flaw”, ClauseBase was built to function in this way. The reason for that is that the placeholder in a predefine only will be shown on the Q&A screen. It does not replace any value in the document.

In order to fix this, you might need to restructure your clause a little bit. For instance, you could add an additional datafield that would determine whether the second person should be the same as the first one. If so, the value will be added into both sub-clauses. If not, then two different values will be inserted.

I attached a suggestion below.
image