Conditional Text "else" function limits and text styling

Hello everyone,

I have been looking into Smart Templates recently and have a question regarding conditional text.

In my example below, I have several nested conditions and want to make use of the | else: option.

Example “1” works as expected, outputting “Show text A with [duration]” OR “Show text B”.

However, I would like to format the output of @bold-duration in bold. To do this, I need to remove the cyan highlight:

Whilst @bold-duration is now correctly formted in bold, this breaks the “else” condition - in example 2, i can no longer “show text B” as an alternative to “text A”.

Is there a way to keep the “| else” condition whilst interrupting cyan highlighting, like shown in Example “2” above?

Thanks!

Best
Kai

Hi Kai,

This is a fundamental technical limitation of how Smart Templates work: everything highlighted in cyan will get the same formatting.

One possibility to somewhat avoid this is to put your condition only at the start of the paragraph, i.e. to leave the rest of the paragraph non-highlighted.

Another option is to convert your condition into a shared condition, and then put all situations next to each other, each time with perhaps completely different formatting.

I do realise that neither option is completely satisfying, particularly when you are used to the power of Clause9. Do keep in mind that Smart Templates is intended to focus on simplicity, with the tradeoff of less power.

1 Like

Thanks for the quick reply Maarten!

Shared conditions seem to only output true/false, is that right?

Also, I don’t have the “Insert condition into document” button in my interface:
image

I was trying to make use of “ELSE” in a longer clause with a lot of nested conditions, but I suspect this may be going beyond the use-case of Smart Templates.

I find that when I have the conditional formatting at the beginning of a paragraph I end up with a blank line where the paragraph would have been had the condition been fulfilled. So if I had a paragraph with a conditional like “TestVariable = True: Blah Blah Blah” if the answer is true everything is fine, but if it is false a blank line appears in my document that has the same spacing before and after the line. Is there a way to avoid that?