| View previous topic :: View next topic |
| Author |
Message |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Mon Oct 03, 2011 6:29 am Post subject: Base, mailmerge and conditional text |
|
|
I have created a database of donors for a small local charity and wish to create a mailmerged form letter from it. Most of it works fine but I want to add a paragraph of conditional text dependent upon a Boolean field returning a "FALSE" value.
I have searched the program help files and the online help to no avail.
Please could someone tell me how to achieve this.
Last edited by Flecks Walker on Mon Oct 03, 2011 1:37 pm; edited 1 time in total |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Mon Oct 03, 2011 11:39 am Post subject: |
|
|
This assumes your database contains a boolean field named Boo.
Where you want the conditional text do Crtl+F2. Select the Function tab and Conditional Text. Enter the condition
Boo EQ false
and enter the desired text in the Then box. No quotation marks are required anywhere. |
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Mon Oct 03, 2011 11:40 am Post subject: |
|
|
| Thanks John. I'll give that a try. |
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Mon Oct 03, 2011 11:58 am Post subject: |
|
|
No, that didn't work. At another point in the document I also inserted the name of the Boolean field and it prints "TRUE" when the field is checked but nothing when it is unchecked (ie FALSE).
Bearing that in mind, I also tried Boo != true and that didn't work either. The conditional text is never being printed.
I also tried using Databasename.Tablename.Fieldname for the condition and that didn't work either.
This is getting very frustrating and I may have to resort to two different form letters. |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Mon Oct 03, 2011 12:10 pm Post subject: |
|
|
| Quote: | | No, that didn't work. | It worked for me in my test document. OOo 3.3 under Windows.
Try NEQ for not equal.
Open your document and do Edit > Exchange Database and define the database table on the right even if it looks correct on the left. |
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Mon Oct 03, 2011 12:32 pm Post subject: |
|
|
Hi John,
No success with that either. I've also tried the "Hidden paragraph" option rather than hidden text, with no luck.
I'm also using 3.3 but on Windows Vista if that makes a difference.
Is there an online tutorial anywhere? |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Mon Oct 03, 2011 1:37 pm Post subject: |
|
|
Thanks that looks useful. I'll try it with Boolean fields and let you know how well it works. _________________ try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); } |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Tue Oct 04, 2011 7:12 am Post subject: |
|
|
| Quote: | | I'm also using 3.3 but on Windows Vista if that makes a difference. | I'm also using Vista so that's not your problem. |
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Tue Oct 04, 2011 8:31 am Post subject: |
|
|
| Villeroy wrote: | | http://openoffice.blogs.com/openoffice/2010/04/how-to-hide-lines-if-a-field-is-empty.html |
I've tried the example given in that tutorial, both with and without the square brackets, and it doesn't work for empty fields. Neither does it work for Boolean fields using any of the following constructs in the Condition box:
[DatabaseName.TableName.FieldName] EQ false
[DatabaseName.TableName.FieldName] EQ FALSE
[DatabaseName.TableName.FieldName] NEQ true
[DatabaseName.TableName.FieldName] NEQ TRUE
I've had to resort to having two form letters, with and without the paragraph I'm trying to hide. I've also had to modify my database so that there are no empty fields in the address block as I cannot hide empty fields in the way the tutorial suggests.
It's irritating me that I can't get it to work. Should I try reinstalling Open Office? _________________ try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); } |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Tue Oct 04, 2011 2:50 pm Post subject: |
|
|
Thanks, John. I'll give that a try right now. _________________ try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); } |
|
| Back to top |
|
 |
Flecks Walker General User


Joined: 03 Oct 2011 Posts: 10 Location: Scotland
|
Posted: Tue Oct 04, 2011 3:23 pm Post subject: |
|
|
Hmmm. Well, that was a bit of a disaster! OO crashed twice whilst trying to create the mail merge text document and, once I had finally created it, proceeded to number the pages in a very strange way (1, 3, 5 etc up to 41 when there are only 22 entries in the database). Closed everything down and renamed the ....\user.old directory as ....\user then it all came good again. _________________ try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); } |
|
| Back to top |
|
 |
Jjacksonjackson Newbie

Joined: 09 Jan 2012 Posts: 1
|
Posted: Mon Jan 09, 2012 11:52 am Post subject: |
|
|
| Mail Merge Is Generally Used For Sending Multiple Mail While , Conditional Text Is Usually Written By Experts And They Generally Share Their Review In Detailed Manner . |
|
| Back to top |
|
 |
|