In LiveCycle, how do I show something based on XML value? I recently switched from coding XSL to using LiveCycle for dynamic PDF document creation. In XSL, I would use a simple IF statement referring to the XML (a flag equal to 1) to determine if a particular part of a document should appear. For example:
<xsl:if test="formletter/flag = 1">
<fo:block>This text would display</fo:block>
You first need to make sure the text you want to show/hide is inside its own Text Object and you want to set it to Invisible. In my example below, my Text Object is named "FlagText." As you can see below, I have this text object inside a Subform named "sfPageText." I am using Floating Fields for my XML flag and for my text that appears on the page because in my particular document, this text is not interactive. Perhaps there is a better way to do this, but in my layout, I had to put my floating field flag inside its own Text Object, and I had to set the Text Object to Invisible. The reason for this is because when you try to set just the Floating Field to Invisible, it still shows up in the PDF output.