Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Table Transformer - How to itereate elements returned by String Split function

mzaldivar January 19, 2023

Hello community,

This question is about the javascript function Split using FORMATWIKI.

I see examples where you can do this: T1.'Column_Name::string->split("/")->0, T1.'Column_Name'::string->split("/")->1, etc. However, since Split function returns an array of strings, is there a way to iterate each of the elements of such array?

 

Thank you very much for any insights.

 

Best,

__

Mario

1 answer

3 votes
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 20, 2023

Hi @mzaldivar,

You may also check this example from our documentation (please navigate to the section “Splitting cell values in a column to different rows” if the anchor doesn’t work). Seems that it looks similar to your question.

If you need to do smth else, please provide a screenshot of your source table and describe what exactly you need to achieve (here or via our support portal that is based on Jira Service Desk and is confidential), we’ll try to help with the query.

mzaldivar January 20, 2023

Hi Katerina

Thanks for the reply! - What I was looking for is more a way to store the elements of the returning array so that I can format each one. For example, in one single cell I have N URLs, such as http1, http2, http3, etc and I want to convert each one into links. So I was thinking of splitting and iterate one by one. Would that be the right approach with table transformer?

 

Thanks!

Like Stiltsoft support likes this
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 23, 2023

Yes, your case seems to be similar to the one I provided a link to.After splitting your links using the similar beginning or a character between them, you may use another Table Transformer macro with the FORMATWIKI function to recreate clickable links from each entry.You may share a screenshot of your source table here or via our support portal as I've mentioned before and we'll look into the case thoroughly.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events