Trying to parse user provided content in a table - example
||Property||Value||
|prop1|Value 1|
|prop2|value 2|
eg
||Property||Value||
|Date|2025-02-08|
|Day|Saturday|
|Year|2025|
|Month|February|
|Day|8|
I can use the indexOf to find the property "cells" looking for a way to find the first pipe "|" after "|prop1|"... the first pipe after "|prop2|" etc.
Where are you trying to do this?
For example, if this is with an automation rule you could try using the match() function with a regular expression:
Kind regards,
Bill
Thanks for the suggestion - looks promising. Will give it a try and update here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Can you help with syntax to access the array elements? I thought I would add the array index in brackets (e.g., [0]), but am getting the following error:
Error rendering smart-values when executing this rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For accessing list elements in a rule, use the 0-based get() function:
{{issue.description.match(".*(|).*").get(0)}}
or use the first function to get the 0th one:
{{issue.description.match(".*(|).*").first}}
Wouldn't both of those just return the pipe character?
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.