Difference between # and & in loop

BaldDude79 March 9, 2017

Hi,

I looked in the documentation, but can't seem to find the answer. In Xporter, when using a template, what is the difference between # and & ? I have seem both, but can't figure when I use one instead of the other?

Example:

&{for issues}
Issue Key: ${Key}
&{end}

    vs

#{for issues}
Issue Key: ${Key}
#{end}

 

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 9, 2017

Hi @Barry Allan,

The main difference between $ and & is:

& -> Must be used on iterations over Issues. This allows you to create static zones in your documents.

#-> Must be used on conditional blocks or iterations over Issue data like Comments, Links etc...

Regarding to the first one, you can see more here.

The $ is used to get printed fields on document, also used to call Xporter functions.

Finally, you can use Javascript code too, using the notation %{Javascript code here}. This allows you to do some data handling and it is also used on conditional block as a condition.

Cheers,

Rui Rodrigues.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events