Attempting to pull the last string from the results of split()

I’m trying to generate a table that will include links to Jira projects, but I don’t need the entire Jira link displayed in the table. One idea I had was to use split to pull the Jira issue number from the URL and display that, so the column would be something like

link(jira, <problemcode>) AS "Jira"

Right now, I have

split(jira, "/")

Which parses the links out into separate strings, where project-123 is the 5th field in the list.

The other issue is that link() appears to only link internally, meaning if I click on it, I just create a note with the name of the URL from jira. This should instead link directly to my Jira issue.

The two things I need to do from here are:

  1. Get the project-123 to display as the only output in that field
  2. Have project-123 link to an external URL instead of a note named after the URL

Any help on this would be greatly appreciated!

To start, it’s advised to give us an example of the original link format:

  • the input format
  • the output desired format

Then we can explore elink()

Please provide more information as to the context of your query.

If you’re in javascript, you might want to look at Array.prototype.pop() - JavaScript | MDN

Otherwise, you might want to look at either negative indexes of the array, or possibly reversing the array and picking the first element…

It all comes down to context

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.