Nested Field Codes

How can nest fields within other fields, like using a field or variable in “then” box of conditional text?

Explained, as requested here by one of friends:
Well. I wanted a conditional text either “this” or “that” depending on a variable. But the “this” or “that” themselves contain some variable values and thus hardship in putting it in conditional text.

Now, I typed both the text in the document, made both as separate sections (Insert->Section), with “Hide Condition” for each, both conditions contra to each other. This way, one is displayed at any given time.

Hope this idea could help some of our friends!

https://help.libreoffice.org/latest/tg/text/swriter/guide/conditional_text.html

It seems that you cou can use only text constants in the then/else part of a conditional text.

I myself found a way. With hidden section, I can do the same. Using MSWord for so long, I need to think differently for solutions. Will keep experimenting. Thanks!

@mpramanathan: could you please elaborate a bit more your question? As such, I don’t understand it. Describe your goal and its purpose in writing a document.
Do it editing your question so that it is self-sufficient and complete (not needing to read a sequence of comments).

As there is no equivalent to “if … then … else …” (you only have “if … then …”), you must effectively split your alternatives into two blocks “if … then …” and 'if not … then …" with two hidden paragraphs.

I recommend you don’t multiply the number of sections in your document unless you really need them (i.e. you want a temporary change in the number of columns in part of a page) because sections make the document more unstable and larger. There are also various “glitches” in multi-column sections requiring frequent fixes (like adding some text and immediately erasing it to force a formatting/layout update).

Instead use Hidden Paragraph (or Hidden text for words inside a paragraph) provided by Insert>Field>More Fields, Functions tab.