Forums

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

How to convert multiple various numbers from one field and add them as labels

Denis November 26, 2021

Hi together,

 

I have the following problem during creating an item (epic) from a webhook.

Trigger: Webhook

Goal: Creation of an epic

 

I have a field in the content of the webhook: "fieldInWebhook"

This field can have zero, one, or multiple number values.

 

Examples:

"fieldInWebhook":null

"fieldInWebhook":"10"

"fieldInWebhook":"10,15"

"fieldInWebhook":"10,16,18"

 

Each of these values have a name.

Examples:

10 = Cat0

15 = Cat5

16 = PeterPan

18 = RandomValue

If for example I get the following incoming webhook:

"fieldInWebhook":"10,16,18"

I want to add the labels "Cat0", "PeterPan" and "RandomValue" to the epic I create.

 

Question: How can I convert the Numbers to strings and split them in different labels?

 

any solutions?

 

Thanks

Denis :)

1 answer

0 votes
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.
November 29, 2021

Hi @Denis 

Perhaps you could do this with repeated or chained replaceAll() functions on the values -> labels, and then use an advanced edit with JSON to add the values from a stored created variable.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer