Difference between # and & in loop

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

442 views 6 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you