Xporter: How to print variable used to iterate

Hello, the question says it all. I'm trying to print the value of a variable used to iterate in  a for loop... but nothing is shown.

   

&{for count=TestsCount}
        Count: ${count}
   &{end}

When using this, Count doesnt show anything, but TestsCount is equal to 2.

What am I doing wrong?

 

Thanks for your help.

1 answer

1 accepted

Hi @Barry Allan,

This &{for...  &{end} notation is used only to iterate over issues.

In your case you just need to use this (Xporter 5.0):

#{for count=TestsCount}
Count: ${count}
#{end}

If you just want to print the TestsCount value use this:

${TestsCount}

Cheers,

Rui Rodrigues

I can TestsCount, but the for loop doesn't print any value. I do have Xporter 5.0

The count variable represents the current index value. What do you want to print? The total or the current index value?

The current index value.

You must user ${count} to print the current iteration index, as shown on the example above.

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 6 hours ago 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...

83 views 4 4
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