Conditional Graphics

P

Paul Moloney

I wanted to insert and subsequently update a logo in a document depending on
the value of a document property. I used the following:

{If {DocProperty "Product Name" = "Product1" }
"{AUTOTEXT Product1Logo }"
"{AUTOTEXT Product2Logo }"
}

However, this appears to insert the graphic the first time around,
but if the value of the ProductName doc property is changed, the
graphic is not updated.

I know that I could use a IncludeGraphic referenence, but I would
rather keep the document self-contained.

Does anyone know a solution?

Thanks,

P.
 
M

Margaret Aldis

Hi Paul

This sounds like simply a case of needing to update fields - they don't
update automatically after changing a document property.

Worth remembering too that AUTOTEXTs are stored in templates, not the
document itself, so of course you must have the template available - but if
that was your problem I think you would see an error message rather than the
non-updated graphic.
 
P

Paul Moloney

This sounds like simply a case of needing to update fields - they don't
update automatically after changing a document property.

Hi Margaret,

I thought that too, but manually updating each field
didn't help.

Then I checked again, and realised I had the brackets
in the wrong place in the IF statement - oops. :) It
should have been:

{If {DocProperty "Product Name"} = "Product1"
"{AUTOTEXT Product1Logo }"
"{AUTOTEXT Product2Logo }"
}

This works fine,

P.
 

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