Hi team,
I am trying to split URL of this form "https://abcde.grey.company/department/123456/overview" to just get 123456 in custom field.
I am not sure which function to use as the numerical value in the URL might be of 7/8 digit or even 5/6 digit long,.
Hello @Mihir Vibhu
If this URL format will not change and you need to extract the Dept ID, you can keep it simeple and use
{{Text 1.substringAfter("department/").substringBefore("/")}}
where {{Text 1}} holds the URL and replace it with whatever smart value holds your URL.. but if you have complex extraction, you have to use match/regex functions.
Hope it helps. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri ,
stumpled upon a blocker. Looking into the raw data, we might have some links with
"https://abcde.grey.company/user/123456/profile" and may contain some other variant.
What would be your suggestion to ensure we cover all variation ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can just use the substring resource. Like this: {{issue.customfield_XXXX.substringBetween("=","&")}}
Create a variable for your link, like called: URL
Then use a substring: {{URL.substringBetween("department/","/overview")}}
Try this and let us know if you have any questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.