On Sun, 2012-03-18 at 19:53 +0000, Mark Stanton wrote:
> For my mailmerge I want to set up a conditional paragraph conditional
> on more than one thing.
>
> I've got a database field "Country", and if this is blank or contains
> "Scotland" I want the paragraph hidden.
>
> I *think* the condition ought to be
>
> NOT Country OR Country EQ 'Scotland'
>
> but it doesn't work. I thought blanks at the end of the country
> field might cause a problem so I tried
>
> NOT Country OR 'Scotland' EQ Country
>
> but that didn't work either.
>
> The help states that the fields ought to be written as
>
> <database>.<table>.<field>
>
> but that doesn't make any difference either and the single condition
> "NOT Country" does work, although it's insufficient for my needs.
>
> Have I got my logic entirely wrong, or can the condition expression
> not have more than one part?
>
> Mark Stanton
> One small step for mankind...
Might be in the logic. You wrote "if this is blank or contains
"Scotland" I want the paragraph hidden."
I would write this as
If
(<db>.<table>."Country" IS NULL) OR (<db>.<table>."Country"='Scotland')
then the paragraph is hidden.
Then again in LO queries, this is written as
(<db>.<table>."Country" IS EMPTY) OR (<db>.<table>."Country"='Scotland')
See if either of these work.
--Dan
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted