Conditional DB-Fields

Hello,
I want the following to work in writer (LO 4.3.5.2, Linux-Mint 17):
if db.table.field != "" -> print db.table.field else print nothing.
In other words - if a field in a DB-tuple isn't empty I want LO
to print that field, otherwise don't print anything. I have no
problem printing "fixed text" if a condition is fulfilled. However,
I can't get it to work in case I want the DB-field itself printed.
Regards
H. Stoellinger

Heinrich ,
in the past i used the the "name" of the DBfield in a expression of a Conditional field.

something like:

suppose your DBfield is namend GENDER then

if GENDER = "Women".....

hope it helps

Fernand

1) Insert > Field > Other > Tab "Functions"

2) click on Field type "Conditional Text" (or similar, I don't know the
exact english terms as I use a German localisation)

3) Enter...

Condition: !db.table.field

Then: (leave empty)

Else: db.table.field

Works well on my machine (4.1.6.2/Linux x64)

Nino

1) Insert > Field > Other > Tab "Functions"

2) click on Field type "Conditional Text" (or similar, I don't know the
exact english terms as I use a German localisation)

3) Enter...

Condition: !db.table.field

Then: (leave empty)

Else: db.table.field

Works well on my machine (4.1.6.2/Linux x64)

Nino

Hello,
I want the following to work in writer (LO 4.3.5.2, Linux-Mint 17):
if db.table.field != "" -> print db.table.field else print nothing.
In other words - if a field in a DB-tuple isn't empty I want LO
to print that field, otherwise don't print anything. I have no
problem printing "fixed text" if a condition is fulfilled. However,
I can't get it to work in case I want the DB-field itself printed.
Regards
H. Stoellinger

Base is not a database. If your Base document is connected to some kind
of HSQLDB (see status bar), the following expression serves your need:

COALESCE("Field Name", '')

The embedded version 1.8 of HSQL is documented here: