Skip to content

Mail merging a tick box

Featured Replies

I don't know if anyone can solve my problem: I am trying to set up a mail merge that originates from a tick box field in a database. This is exported to Excel, where it's converted to a 1 or a 0. I'm trying to convert it 'back' to a tick box or at least substitute 1 and 0 for 'Yes' and 'No'. The best I've been able to come up with off the internetz is the following field code:

{ IF "Bool2" = 1 Yes No }

...but this comes back with 'No' regardless of the contents of the field in the source spreadsheet. I did wonder if I needed to go with:

{ IF MERGEFIELD "Bool2" = 1 Yes No }

...but that just gave me 'Bool2' all the time???

Where am I going wrong? It's Orifice XP if that makes any difference???

Is it being imported as text rather than a number and then not working in the boolean?

If you change the = to > 1 Yes No does it make everything Yes?

  • Author
If you change the = to > 1 Yes No does it make everything Yes?

As it happens, yes! And likewise if I try > 0 Yes No??? :confused:

If you set the formatting to one of those cells specifically to number what happens then?

  • Author

No difference, I'm afraid... :thumbdwn:

=(if(a2 >= 1,"yes", "no"))

I've just done that and put the value in A2 and that work correctly.

If 0 you get a No if 1 or more you get a yes displayed.

I assume you're using bool2 to refer to a cell within the column?

  • Author

Sorry, didn't make it clear: the coding I'm trying to get to work is in a Word mailmerge field rather than in the spreadsheet itself, and I don't want to have to do anything to the spreadsheet - the mailmerge field just doesn't seen to be able to resolve the logic??? :confused:

Bestthing to do in this case I guess would be to get the database to substitute the output of a certain field when doing the SQL to change the bool to a text yes/no

  • Author

Thanks, Mark - will see how I get on attacking the problem from the other end!!!

Let me know how you get on as it's going to bug me now :thumbup:

  • Author
Let me know how you get on as it's going to bug me now :thumbup:

Well, I tried everything I could think of at both the export and the import end without success, and have resorted to implementing a work-around. The reason I tried mail-merge in the first place was because blank fields cocked-up reports when they were generated direct from the database. I had hope m-m into a table of fixed structure would get round this (which it did), but it obviously introduced new problems! :doh:

So instead, I have set the database up to show 'Pending' as default text in fields, which looks a bit naff but at least allows reports to be generated how I want them... :thumbup:

  • 2 weeks later...
  • Author

Mark,

I had to revert to 'Plan A' after all, but just in case you're interested (or anyone else has a similar problem) I found the solution here:

WD2000: How to Show Access Check Boxes During a Mail Merge

Not sure why it:

a. Didn't come up when I searched originally, and;

b. Won't work when the field codes are edited manually;

...but I can do what I need to do now, so smiles all round! :)

Mark,

I had to revert to 'Plan A' after all, but just in case you're interested (or anyone else has a similar problem) I found the solution here:

WD2000: How to Show Access Check Boxes During a Mail Merge

Not sure why it:

a. Didn't come up when I searched originally, and;

b. Won't work when the field codes are edited manually;

...but I can do what I need to do now, so smiles all round! :)

That's cheating, using wingdings characters :D, but hey it works so all good and handy to know that's the official way of doing it should i need that in future.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Important Information

Welcome to BRISKODA. Please note the following important links Terms of Use. We have a comprehensive Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.