> For the complete documentation index, see [llms.txt](https://codifi-fdm.gitbook.io/codifi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codifi-fdm.gitbook.io/codifi-docs/reports/report-tag-conventions/troubleshooting-tips.md).

# Troubleshooting Tips

## Check Your Conventions

The first thing to check when you are receiving "\_\_INVALID TAG\_\_" errors or unexpected results within your generated reports is to scrutinize the report template that is being used, and to make sure that the report tags included therein are written per correct conventions.

* They should be written in {{doubled curly brackets}}.
* Count your parentheses! If you have a report tag that has multiple clarifications within it, you may have multiple nested pairs of parentheses. Make sure you've included enough to enclose all the necessary elements of the tag.\
  \
  Example = {{checkbox(field(Date Constructed/Age).equals(Historic))}}<br>
* Is the Project content that you're trying to source with your report tag a collection? If so, it has to be written one of three ways:
  * in a "for each", with both an opening and an ending element; example = {{foreach(medias)}}{{image}}{{endForeach}}
  * in a table, with both an opening and an ending element; example = {{table(medias)}} *then construct your table* {{endTable}}
  * if neither of the above, and you're intending on only getting *one* result from a collection, then you need to use a "first"; example = {{first(medias).image}}
* When nesting multiple collections within each other, make sure that you've included all the correct opening and ending elements for each tagged collection.
* Did you check any case sensitive elements within your tags? This is important when using terms in your tags that have multiple words (i.e. "LocationDetails"), when specifying exact fields from Records that you want to print values for (you need to observe exactly how the Field Name was written in the Configuration Library of your tenant), and other scenarios. When in doubt, make sure your case sensitivity counts.

## Remember: Context Matters!

Keep in mind that the context that you generate a report from within a Project plays a big role in what results you get back in the printed reports. For example, the report tag {{name}} can return the name of many different pieces of content. If you generate the report from the Project-level, it'll return the name of the Project. If you generate the report from a specific Record then you'll get the name of that Record. The context where you generate a report from can change your results.

This can become much more nuanced if you are tagging collections into your report template. When the system reads that you're trying to source content from a collection, it's going to look for content that's relevant to your context, unless you have deliberately specified otherwise.

If you are getting unexpected results in your printed reports, it can be worth double-checking that the context you're generating your reports from makes sense with the report tags that you've included within the report template. [You can find some additional details on context considerations with collections here](https://codifi-fdm.gitbook.io/codifi-reports/reports/report-tag-conventions/collections#the-context-of-collections).
