Hidden/Conditional Paragraphs Not Consistently Working in Writer

Using LibO on Win 10

I have a standard letter that I send to new clients, some of whom live in apartments (or prisons) that require an extra line or two on the address (“Inmate ID 99999” or “Apt. 2”, for example) and others do not. The data is drawn from a HyperSQL database. For the lines that are sometimes used and sometimes not, I set a hidden paragraph with this condition:

[SLSPLLCDB.A2-Client Directory.ClientStreet2] == ""

Sometimes this works as expected (the paragraph shows up when “ClientStreet2” is not empty, and is hidden when it is empty) but probably 75% of the time, it hides the paragraph even when “ClientStreet2” contains text (“Apt. 2”).

Any ideas how to fix this?

As a possibly related issue, I’ve also noticed that conditional text does the same thing. For instance, I have it set up so that if the client is male, the gender-specific pronouns (“him/her”, “his/hers”, etc.) are supposed to change. I do this with a conditional text variable where the “condition” is set to

[SLSPLLCDB.A2-Client Directory.ClientGender] EQ "M"

with “then” as


and “else” as


Sometimes this yields the results I am looking for, sometimes it flips (so if I make the ClientGender “M” it will display “she” but if it is “F” it displays “he”), and sometimes it simply ignores the condition and makes everything “he”.

I’ve burned my eyes out reading the documentation and can’t seem to figure out what I am doing wrong (if anything).