I'd like to say:Dear John,
How do I get those conditions within the mail merge?Dear Dr. Smith,
FYI, if they are not a doctor, the "prefix" field in my spreadsheet is blank.
I'd like to say:Dear John,
How do I get those conditions within the mail merge?Dear Dr. Smith,
Ok, I did all that. And it seems that the Condition & Then work great. However, when it comes to the Else statement, it prints literally:Villeroy wrote:You can do this with simple spreadsheet formulas.
If it were a real database, you could do it in the database program.
You can do at the end of the pipe in Writer:
Insert>Fields>Other...
Tab [Functions]
Field Type: Conditional Text
Condition: DatabaseName.TableName.PrefixField=="" (yes, 2 equal signs, 2 double-quotes)
Then: DatabaseName.TableName.ForenameField
Else: DatabaseName.TableName.PrefixField" "DatabaseName.TableName.SurnameField
Of course I substituted my DBname, Tablename & fields. It prints the first names prefectly fine, but then it has that literal statement for whenever there is something in the "prefix" field.DatabaseName.TableName.PrefixField" "DatabaseName.TableName.SurnameField
Is there something wrong with the syntax of this statement?DatabaseName.TableName.SurnameField
This works perfectly. I have to put the 2 conditional fields side by side with a space in between. Thanks so much!Villeroy wrote:Trying 2 conditional fields:
Condition: DatabaseName.TableName.PrefixField==""
Then: DatabaseName.TableName.ForenameField
Else: DatabaseName.TableName.PrefixField
Condition: DatabaseName.TableName.PrefixField==""
Then: (leave blank)
Else: DatabaseName.TableName.SurnameField