Forums

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

Remove text and get only some strings using automation

Aaron Pavez _ServiceRocket_
Community Champion
January 14, 2025

Hi Everyone!

Ive been trying to do this using automation. I'm able to remove only one set of IDs from the field. I have issues removing all the others.

This is the custom field value:

[5005e00000WW2BuAAL|https://urlhere/5005e00000WW2BuAAL ], [5005e00000WU4YGAA1|https://urlhere/5005e00000WU4YGAA1 ], [5005e00000WU1fGAAT|https://urlhere/5005e00000WU1fGAAT ]

I want to remove everything else and keep the IDs before the first square bracket and the pipe.

I want to have this in another field:

5005e00000WW2BuAAL,5005e00000WU4YGAA1,5005e00000WU1fGAAT

With remove, replace, substring I can remove the first one. Im not able to remove the other two Ids, or three or four.

but this field can change, I can add more, delete some. So the automation should be able to capture IDs (which might not start with 5005. I haven't tried using that approach though)

Any help is appreciated!

Regards

Aaron

2 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
January 14, 2025

Hi @Aaron Pavez _ServiceRocket_ 

The custom field appears to contain a list of links, with a comma delimiter.  Is that correct?

If so you could use the list and text functions to help parse the data:

For example:

{{issue.myCustomField.split(",").trim().substringBetween("[", "|").join(",")}}

Kind regards,
Bill

Aaron Pavez _ServiceRocket_
Community Champion
January 14, 2025

Hi!

That's what I thought. I have to do several things with the same string. But I didn't know how to combine the functions. 

and yes they are links. When I save them to a variable you see them like I posted.

Let me test it and I'll be right back my hero!!

Regards

Bill Sheboy
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.
January 31, 2025

Hi @Aaron Pavez _ServiceRocket_ 

Just following up to check if that worked with your testing.  Thanks!

Bill Sheboy
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.
April 8, 2025

Hi @Aaron Pavez _ServiceRocket_ 

Just following up to check if this answered your question.  If so, please consider marking this one as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule changes.

Thanks!

Aaron Pavez _ServiceRocket_
Community Champion
April 8, 2025

Done @Bill Sheboy You are a rockstar!

Thanks!

Like Bill Sheboy likes this
0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
January 14, 2025

Hi @Aaron Pavez _ServiceRocket_ 

The links require a SalesForce login. Can you update your post with links that can be accessed anonymously?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events