Conditional user field style in writer

Hi,

I have a writer (not calc!) template with some inserted user fields.

I would simply like to modify the style of the field value to italic if the user field has a particular value, so if my user field name is ‘company’, I’d like to configure this pseudo code:

If company.value == ‘Unassigned’ apply
italic style

Googling for conditional formatting etc seems to provide solutions for calc.

Any hints welcome, thank you!

Hi

LibreOffice does not have conditional character styles (you can create conditional paragraphs styles but the condition depends on the context: paragraph in a table, a section, a header, not the contents of a variable).

One solution might be to insert Hidden Paragraph fields that can hide paragraph depending on the contents of a variable.

In the ConditionalField.odt attached document the Company field is in italics. Double click on the first “Unassigned,” change the value, the paragraph will be hidden and another will display the bold field.

HTH

Regards