Hello Community,
Fighting this one up to a point i could really wish some help..
I have an automation rule that triggers every time a new customer is added to a list from Salesforce. It is than look for spaces and replaces them with "_" as it will be transform to a label field.
At this point i run on each customer, validate it, adding specific comments and update the label field.
My problem is that sometimes i get a space at the beginning of the customer name, causing it to be looking like "_Customer" instead of "Customer"
Been trying to use multiple ways (2 examples), but none are working....
1. {{#if(({{Custo}}.startsWith("_")),({{Custo}}.substringAfter("_")),{{Custo}})}}{{/}}
2. {{#if(issue.customfield_10193.replace(" ","_").startsWith("_")),(issue.customfield_10193.replace(" ","_").substringAfter("_")),(issue.customfield_10193.replace(" ","_"))}}
Any idea how can i break the list based on spaces and also validate no space at the beginning?
What are some examples of the contents of your customfield_10193? That may help to decide when / how to perform the replacement of spacing to underscores.
For example, some possible configurations might be:
From what you describe, I suspect it is a variation of #3, where the delimiter between names is a comma followed by a space.
In that case, you could try:
{{issue.customfield_10193.split(", ").join(",").replace(" ","_").split(",")}}
Kind regards,
Bill
Thank you very much @Bill Sheboy
You are correct, my source is similar to #3 and looks like it works with new branch source.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.