OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Base, mailmerge and conditional text

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Mon Oct 03, 2011 6:29 am    Post subject: Base, mailmerge and conditional text Reply with quote

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
View user's profile Send private message Visit poster's website
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8995
Location: Lexinton, Kentucky, USA

PostPosted: Mon Oct 03, 2011 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Mon Oct 03, 2011 11:40 am    Post subject: Reply with quote

Thanks John. I'll give that a try.
Back to top
View user's profile Send private message Visit poster's website
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Mon Oct 03, 2011 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8995
Location: Lexinton, Kentucky, USA

PostPosted: Mon Oct 03, 2011 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Mon Oct 03, 2011 12:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Mon Oct 03, 2011 12:55 pm    Post subject: Reply with quote

http://openoffice.blogs.com/openoffice/2010/04/how-to-hide-lines-if-a-field-is-empty.html
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Mon Oct 03, 2011 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8995
Location: Lexinton, Kentucky, USA

PostPosted: Tue Oct 04, 2011 7:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Tue Oct 04, 2011 8:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8995
Location: Lexinton, Kentucky, USA

PostPosted: Tue Oct 04, 2011 2:10 pm    Post subject: Reply with quote

I doubt reinstalling OOo will help but you may want to replace the user directory which often solves weird problems.
http://user.services.openoffice.org/en/forum/viewtopic.php?f=74&t=12426
Back to top
View user's profile Send private message
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Tue Oct 04, 2011 2:50 pm    Post subject: Reply with quote

JohnV wrote:
I doubt reinstalling OOo will help but you may want to replace the user directory which often solves weird problems.
http://user.services.openoffice.org/en/forum/viewtopic.php?f=74&t=12426


Thanks, John. I'll give that a try right now.
_________________
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
Back to top
View user's profile Send private message Visit poster's website
Flecks Walker
General User
General User


Joined: 03 Oct 2011
Posts: 10
Location: Scotland

PostPosted: Tue Oct 04, 2011 3:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Jjacksonjackson
Newbie
Newbie


Joined: 09 Jan 2012
Posts: 1

PostPosted: Mon Jan 09, 2012 11:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group