Dynamic vs. conditional formatting

G

Greg S

Is there a way to change the formatting on an object (e.g. table background
color) and have that format dictated by a value in the XML? I'm not talking
about conditional formatting, but true dynamic formatting. For example: I
can use conditional formatting to change color, but I have to code the form
ahead of time to expect specific colors. In a dynamic scenario I want to
have the content drive the color, but I don't want to restrict the list of
colors by creating a conditional formatting rule for each possible color.

pseudo code example
Conditional formatting: if myValue = "green", set color = "green"
Dynamic: set color = myValue
 
G

Greg Collins [InfoPath MVP]

You can probably do this by manually modifying the view XSL, but it will probably require that you use a Preserve Code Block to do it if you don't want to lose your changes the next time you save your form template from the designer.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Is there a way to change the formatting on an object (e.g. table background
color) and have that format dictated by a value in the XML? I'm not talking
about conditional formatting, but true dynamic formatting. For example: I
can use conditional formatting to change color, but I have to code the form
ahead of time to expect specific colors. In a dynamic scenario I want to
have the content drive the color, but I don't want to restrict the list of
colors by creating a conditional formatting rule for each possible color.

pseudo code example
Conditional formatting: if myValue = "green", set color = "green"
Dynamic: set color = myValue
 

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