---
title: "Exercise 3 - Populating Epic Links"
canonical: "https://docs.getxporter.app/space/XPORTERCLOUD/528075/Exercise%203%20-%20Populating%20Epic%20Links"
format: markdown
---
> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> > Macro (toc)

# Introduction

In this exercise, you'll learn how to export epic links using an Xporter Template (in a Word format).

# Populating Epic Links

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Create the first page.
> 
> > ℹ️ Begin by creating the first page with a Landscape layout: Layout -> Orientation -> Landscape
> 
> > Macro (rw-step)
> 
> To display the header, you must create the header using a table with six columns and one row:
> 
> | **Key** | **IssueType** | **Priority** | **Summary** | **Links** | **Epic Cases** |
> | --- | --- | --- | --- | --- | --- |
> 
> Since the content below the header is dynamic, first create a single-row table for the header. Below it, add the `&{for issues...}` statement to ensure the header is printed only once.
> 
> > Macro (rw-step)
> 
> Create another row table where the [mappings](https://docs.getxporter.app/space/XPORTERCLOUD/558575) will be populated:
> 
> |  |  |  |  |  |  |
> | --- | --- | --- | --- | --- | --- |
> | ${Key} | ${IssueTypeName} | ${Priority} | ${Summary} | **<span style="color: #FF0000">${Key} </span>****Linked issues and Epic**<br>#{if (%{'${LinksCount}'.equals('0')})}<br>Doesn't have Links<br>#{end}<br>**#{for a=LinksCount}**<br>#{if (%{'${Links[a].IssueTypeName}'.equals('Epic')})}<br><span style="color: #00FF00">(Epic)</span> - ${Links[a].Key}:${Links[a].Summary}<br>#{end}<br>#{if (%{!'${Links[a].IssueTypeName}'.equals('Epic')})}<br><span style="color: #00CCFF">(Link)</span> - ${Links[a].Key}:${Links[a].Summary}<br>#{end}<br>#{end} | #{if (%{'${LinksCount}'.equals('0')})}<br>Doesn't have Links<br>#{end}<br>**#{for a=LinksCount}**<br>#{if (%{'${Links[a].IssueTypeName}'.equals('Epic')})}<br><span style="color: #00FF00">(Epic)</span> - ${Links[a].Key}:${Links[a].Summary}<br>**#{for i=JQLIssuesCount|clause= "Epic Link" = ${Links[a].Key}}**<br><span style="color: #CC99FF">(Story) </span>- ${JQLIssues[i].Key}:${JQLIssues[i].Summary}<br>#{end}  
> #{end}  
> #{end} |
> 
> ## Column Links
> 
> 1. Insert a <span style="color: #000000">phrase with the Key of the Issue (display "Key" with the color red) and linked Issues and Epic.</span>
> 2. Insert a statement to display a message if there aren't any links.
> 3. Add an [Iteration](https://docs.getxporter.app/space/XPORTERCLOUD/428318) to iterate over the links.
> 4. Include a [Conditional Block](https://docs.getxporter.app/space/XPORTERCLOUD/527146). I<span style="color: #0d0d0d">f the current link is an </span>*<span style="color: #0d0d0d">Epic</span>*<span style="color: #0d0d0d">, display the link with "Epic" in green, along with the </span>*<span style="color: #0d0d0d">Key</span>*<span style="color: #0d0d0d"> and </span>*<span style="color: #0d0d0d">Summary</span>*<span style="color: #0d0d0d">.</span>
> 5. Close the statement using `#{end}`
> 6. Insert a Conditional Block. If the current link isn't *Epic*, the Issue link is going to be displayed with "<span style="color: #000000">Link"</span><span style="color: #000000"> in blue</span><span style="color: #000000">, along with </span>*<span style="color: #000000">Key</span>*<span style="color: #000000"> and </span>*<span style="color: #000000">Summary</span>*.
> 7. Close the statement and the Iteration links using `#{end}`
> 
> ## Column Epic Cases
> 
> 1. Add a statement to display a message if there aren't any links.
> 2. Include an Iteration to iterate over the links.
> 3. Insert a Conditional Block: if the current link is an *Epic*, display the link with "Epic" in green, along with the *Key* and *Summary*.
> 4. Within this block, iterate using *JQLIssues* with the clause `"Epic Link" = ${Links[a].Key}`, and print the issues of the current epic with "Story" in purple, along with the *Key* and *Summary*.
> 5. <span style="color: #0d0d0d">Close the Iteration for both links and JQLIssues using </span>`#{end}`
> 
> > Macro (rw-step)
> 
> Close the statement using the mapping `&{end}`
> 
> ## Examples
> 
> Below, (Figure 1) there is a sample of how the mappings will be displayed in a Word template.
> 
> ![Figure 1 - Word template](media://ef24b5aa-be08-44f9-8fe1-4ec122248f9c)
> 
> Below, (Figure 2) there is a sample of how the generated Template will be populated.
> 
> ![Figure 2 - Populated file](media://e661bca4-00b7-44ea-9a6f-01be4a12e6c7)


> ℹ️ **This exercise is now complete. Proceed to **[**Exercise 4**](https://docs.getxporter.app/space/XPORTERCLOUD/429879)** to learn h****ow to populate a Word template with a table of contents.**
> ℹ️ 
> ℹ️ If you like this exercise, please share your opinion on the page by just leaving a comment or a 👍. Your opinion is very important to us.
> ℹ️ 
> ℹ️ Thank you in advance. Enjoy our product!

<details>
<summary>Exercise 3 Resources</summary>

| **File** | **Description** |
| --- | --- |
|  | **Exercise 3** - Sample template file |
|  | **Exercise 3** - Sample generated file |
</details>


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://docs.getxporter.app/space/XPORTERCLOUD/18251779/In-App+Chat+Support).
</details>