docvariables 'errors'

V

Vanguard

if docvariable is blank, can that docvariable be condition on before exe the
merging of that database field ?

using database to merge docvariables

Dr. Russell Dow
1000 SW Vista #1219
Error! No document variable supplied.
Portland, OR 97205
 
J

Jay Freedman

if docvariable is blank, can that docvariable be condition on before exe the
merging of that database field ?

using database to merge docvariables

Dr. Russell Dow
1000 SW Vista #1219
Error! No document variable supplied.
Portland, OR 97205

It's not quite so simple as you'd think. The twist is that there is no
such thing as a "blank" docvariable. If you set the value of a
docvariable to an empty string, Wrod automatically deletes the
variable from the document's Variables collection -- it literally
doesn't exist any more.

The trick is to compare the value of the docvariable field to the
error message you showed above, and display the docvariable field only
if it isn't equal to the error message. To do that you need a couple
of nested fields, like this:

{ if {docvariable X} <> "Error! No document variable supplied."
{docvariable X} }

Each pair of braces must be inserted with Ctrl+F9 and NOT typed with
the { } keys on the keyboard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top