---
title: "Exercise 3 - Populating Epic Links"
canonical: "https://docs.getxporter.app/space/XPORTER/1409430/Exercise%203%20-%20Populating%20Epic%20Links"
format: markdown
---
In this exercise, you'll learn how to export Epic Links on an Xporter-generated file.

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> This is a Word [Template](https://docs.getxporter.app/space/XPORTER/1412105). Create the first page.
> 
> > ℹ️ The layout of the page is going to be in Landscape. On [Microsoft Word, go to -> Layout -> Orientation -> Landscape](https://support.microsoft.com/en-us/office/change-page-orientation-to-landscape-or-portrait-9b5ac1af-9998-4a37-962b-a82b689572a9).
> 
> > Macro (rw-step)
> 
> If you want 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** |
> | --- | --- | --- | --- | --- | --- |
> 
> > Macro (rw-step)
> 
> Since all the table contents below the header are dynamic, first you need to create a single-row table to be the header, and below it add the `&{for issues...}` statement, so the header is printed only once.
> 
> > Macro (rw-step)
> 
> Create another row table where the [mappings](https://docs.getxporter.app/space/XPORTER/1413922) 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}<br>#{end}<br>#{end} |
> 
> The Column Links
> 
> 1. Insert a <span style="color: #000000">phrase with the Key of the Issue (set up the Key of the color Red) and Linked Issues and Epic.</span>
> 2. Add a statement to display a message if there aren't any links.
> 3. Add an iteration to iterate the **Links.**
> 4. Insert a [Conditional block](https://docs.getxporter.app/space/XPORTER/1413770). If the current link is of type **Epic**, the Issue Link is going to be displayed with Epic<span style="color: #000000"> (set up the Epic of the color green) and Key and Summary</span>.
> 5. Close the statement using `#{end}`
> 6. Add 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"> </span><span style="color: #000000">(set up the </span><span style="color: #000000">Link </span><span style="color: #000000">of the color </span><span style="color: #000000">blue</span><span style="color: #000000">) and Key and Summary</span>.
> 7. Close the statement using `#{end}`
> 8. Close the Iteration Links using `#{end}`
> 
> The Column Epic Cases
> 
> 1. Add a statement to display a message if there aren't any Links.
> 2. Insert an Iteration to iterate the **Links.**
> 3. Add a Conditional block. If the current Link is of type **Epic**, the Issue Link is going to be displayed with Epic<span style="color: #000000"> (set up the Epic of the color green) and Key and Summary</span>.
> 4. Insert an Iteration with **JQLIssues: **it is going to iterate using a clause `"Epic Link" =  ${Links[a].Key}`
> 5. Print the Issues of the current epic with Story <span style="color: #000000">(set up the Story of the color purple) and Key and Summary</span>.
> 6. Close the statement using `#{end}`
> 7. Close the Iteration JQLIssues using `#{end}`
> 8. Close the links iteration using `#{end}`
> 
> > Macro (rw-step)
> 
> Close the statement using the mapping `&{end}`
> 
> ### Example
> 
> Below (Figure 1) there is a sample of how the mappings will be displayed in a Word Template:
> 
> ![Figure 1 - Template](media://8c40c69f-e11a-41ba-adf4-462f500a5d2e)
> 
> Below (Figure 2) there is a sample of how the generated file will be populated:
> 
> ![Figure 2 - Template](media://3d5e5ce3-83d4-4f2c-afb8-5f606bee80e0)


> ℹ️ **Exercise 3 is now complete. Proceed to **[**Exercise **](https://docs.getxporter.app/space/XPORTER/1413502)[**4**](https://docs.getxporter.app/space/XPORTER/1415240)** to learn how to populate a Word Template with a table of contents.**
> ℹ️ 
> ℹ️ If you like this exercise, please [write us and leave a comment](https://docs.getxporter.app/space/XPORTERCLOUD/460118/Support) or a 👍. Your feedback is very important to us.
> ℹ️ 
> ℹ️ Thank you in advance. Enjoy our product!

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

| **File** | **Description** |
| --- | --- |
|  | sample template file |
|  | 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/XPORTER/23102936).
</details>