Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Print Only part of the Text Field (multi-line) - Exclude specific values

Alexander Giterman May 19, 2025

I am using Xporter for jira docx template have a custom Text Field (multi-line) and i am looking for a string in it which starts with "DOC" and ends with "SRD" and was successful returning it via this code:

%{var match = '${Related Documents}'.match(/DOC-[^\n\r]*_SRD/); match ? match[0] : ''}

However i am unable to find a solution to display the remaining text without the SRD string.

So in my example the ${Related Documents} value is 

DOC123 Bla Bla Bla SRD

More Text

Some Extra Text

 

What i want to be able to print on my doc is:

More Text

Some Extra Text

Thanks in advance for your help

1 answer

0 votes
David Nickell
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.
May 19, 2025

If you're willing to entertain a technology "shift" or "bolt-on", I may be able to help.  

And no, I'm not trying to sell you another plugin,  This is more of a "plug out"...

Our tool(s) uses Atlassian REST API calls to extract data through Power Query into Excel or Power BI.   Once the data is in Excel, you can do any sort of "excel" thing to it you would like.  That means text manipulation, substrings, and all the excel formula/pivot table things you like.  You can also create versions of the Excel for stakeholders who want to be able to get a data referesh on demand.

However, it's been many years since I've tried to hook Excel and Word together.  So if you're committed to your Word Templates and don't have the skills on board to create your word docs, then you may want to keep looking.

But if you want a simple spreadsheet or you want something more elaborate that you can create from a spreadsheet, let me know.   Thanks.

SplitDime SolutionDiagram.png

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events