This page shows you how to use and insert snippets, that are platform and product specific, to the template that is being developed. Here you will find a list of snippets, which can also be found in the documentation of the desired platform, that are available to be inserted into the current document or spreadsheet.


Categories


The featured Snippets are always categorized by the following categories:

  • Mappings: contain simple snippets and collections;
  • Iterations: contain the iterations that are supported by Document Generator;
  • Conditionals: contain examples of code blocks for "if" statements;
  • Functions: contain the functions that are supported in Document Generator;
  • Xray Entities: contain the snippets related to building Xray templates;
  • Custom fields: contain the custom fields you have in your Jira instance (only available for Xray Document Generator On-Premise and with a successful login).

Some categories can also contain sections that are entirely related to the context of each snippet and usually an integration.



Sections

One example of sections that are used in combination with snippet categories is:

  • Jira Software: contains snippets directly related to Jira.

Jira Field


When dealing with some mappings, iterations or Xray Entities you might come across a mapping called Jira Field. This mapping indicates that you can replace any number of simple mappings that are present in the mapping section Jira Software.

When the snippet is applied to the document, the mapping will appear like this:

Jira Field Example
${<Jira Field>}

If you see this symbol , you can hover your mouse over it and you will be able to see a tooltip that will try to help you.

Search for snippets


Searching for a particular snippet is very simple. All you have to do is use the search bar that is located on top of the snippets page. This will search any snippet that is named or named approximately close to the inserted search query. You can see an example of this in the following image.

Apply snippets

Word Document


Once you find the snippet that you want to use, the process to insert it is extremely simple:

  • If you want to apply a simple mapping, a function or a conditional you only need to click on the snippet;
  • If you want to apply a collection, an iteration or an Xray entity you can click in the "Apply" button to insert the snippet in the document.

Regardless of the type of insertion method used, the snippet will always be inserted in the cursors' position and sequentially, from top to bottom.

Example of the snippets   Example of how the snippets appears when applied to word document

Excel Document


In excel if you want to apply a simple mapping, a function or a conditional, the process is the same as the one performed in Word. However, if you want to apply a collection, an iteration or an Xray Entity the process is slightly different.

To apply snippets, like iterations, collections or Xray Entities, you have the option to select the orientation in which snippets get applied, which can be "Horizontally" or "Vertically."

Regardless of the type of insertion method used, the snippet will always be inserted in the selected cell.

If the option to insert the snippet was Horizontally, the snippet placement in the spreadsheet will be as follows:


If the option to insert the snippet was Vertically, the snippet placement in the spreadsheet will be as follows:

Table of Contents:

  • No labels