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

Trim text between characters

Nodar Vardiashvili March 22, 2024

Hi I want to trim text between "/" to this characters which match "Department".

Office/Country/Service Operations Division/Customer Service Department/Service Performance and Quality Operations Unit/Service Performance Analyst.

I want to trim full text which include "department" . I want to get full name "Customer Service Department" and write it new custom field



1 answer

2 votes
Patrick Tripodi
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.
March 22, 2024

Hi Nodar, 

I am assuming the text is in the description but please update as you see fit.

You can do the following: 

  • Create an automation with whatever your trigger is
  • Add an Advanced Branch
    • Smart value: {{description.split("/")}}
    • Variable name: Whatever you want but I used split
  • Add a condition as a {{smart value}} compare
    • First value: {{split}}
    • Condition: contains
    • Second value: Department
  • Then {{split}} will return Customer Service Department only

SCR-20240322-tzur.pngSCR-20240322-tzxw.png

 

Cheers,

Patrick Tripodi
GLiNTECH

Nodar Vardiashvili March 22, 2024

I tried to do that in object but not working, it doesn't trim departmentScreenshot 2024-03-22 at 6.28.20 PM.pngScreenshot 2024-03-22 at 6.28.49 PM.png

Nodar Vardiashvili March 22, 2024

Also i have case when "Adjarabet/Georgia/Customer Success Division/Customer Acquisition Department/Head of Customer Acquisition Department"  there is two department in text, how different department name da position name where is department too

Patrick Tripodi
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.
March 22, 2024

Looks like the split didn't work since it is still showing the /

Maybe we can try creating a variable first of the first audit log smart value, and then in the branch, add {{variableName.split("/")}}. Something to try, I noticed sometimes I had to do this with long smart values in branches.

I assume you are using the same value in the variable as the second audit log. 

I am unsure how you could do anything but check that the split does not contain "Head of" as well to only return the one value.

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

Hi @Nodar Vardiashvili 

What's the specific outcome you're looking for here? What will the custom field do (i.e why does it need the information)?

Patrick's answer is a good solution, but it feels like you have a specific need here and it isn't quite clear.

Ste

Like Patrick Tripodi likes this
Nodar Vardiashvili March 24, 2024

Hi @Ste Wright ,

 

this information coming from ACTIVE DIRECTORY, I need to  separate it with name, position, division. I need to record the department separately, the division separately, position seperately. in some division doesnt have the department, some departament doesnt have unit, I need to find out where what is written, and type it into the appropriate field.(departament in department, division in division field and etc)

Patrick Tripodi
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.
March 29, 2024

Hi Nodar,

How did you go with this? Not sure if you tried my second solution with creating a variable first or not? 

Also, if the department, division is in the same spot every time, you can use {{variableName.split("/").get(3)}} (for department) This will get the 4th item in the list, with split() transforming a string into a list. 


Suggest an answer

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

Atlassian Community Events