[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

LibreOffice mail merge with conditional text based on database field content



Hoping somewhere here knows more about LibreOffice mail merge than people in the LibreOffice forums. :)

I'm using LibreOffice 3.5.4.2 (Debian/Wheezy) and am having an awful time trying to get conditional text to work.

As an example, I have a database field that contains a single letter (either F or M) denoting gender. I want to replace that with either "female" or "male" in the actual document, based on whether the current record refers to a female or male.

I have a conditional text function, where the function is:

Results.RESULTS.GENDER == "F"

The then part is:

female

and the else part is:

male


Unfortunately the output page always says female no matter what the database field contains.

I have other fields that I'm similarly trying to do a relatively straightforward translation without any luck.

Either conditional text doesn't work at all or I'm missing something. Given that the latter is far more likely, can someone point out what I'm doing wrong?


Reply to: