One powerful feature of fDocs is the ability to conditionally display parts of your template depending on field values. This can be achieved either in the template using a Compare tag, or within fData by adding Conditions.

This gives the possibility of using fData to create a special tag that can be used to put notes and comments in your template that will never be shown when an output is generated – useful if you want to give someone who may open a template at a later date some information about what it’s being used for, or some notes regarding formatting for example.

Here’s how it’s done.

First, open fData and select whichever DSD you want the tag to be enabled for. Note that unless your DSD has a purpose of fDocs then the Conditions button won’t appear on the DSD ribbon.

howto_010514Once you’re there, add a new Condition and set it’s Id and Description to say “Comments”, or “Notes” if you prefer. Then, use the boxes provided to create a Condition that says 1 not equal to 1 (see the screenshot for a guide).

This essentially creates a condition that will always end up being false, so the contents of the tag will never appear in an output. Ensure you set the format of the condition to a number.

Now publish your DSD and in the designer you’ll see a new special tag called Comments. Anything you type into it will never appear in your outputs. Neat!

Of course, you could also do this straight in the template by putting a Compare tag around your comments and setting the values accordingly, but doing it in the DSD makes it simpler for the designer, and means the Compare dialogue won’t keep popping up when you click inside the tag.

We’re looking at making this “Comments” tag a dedicated special tag in future editions of fDocs, so stay tuned for a future upgrade including this feature.

image_pdfimage_print