URL Datasource
Suppose we have a an Elements Connect field, Live Text type plugged on a URL datasource (JSON response)
Edit view Query:
$.continents[*]
If the user was allowed to select multiple values (continents) in the Edit view, setting the Display View will be by using the $currentCustomfieldValue variable and a function that will handle the multiple values; otherwise, only the first value will be displayed.
To display this field properly on Jira issue view screen, we need to access the field Key in the Display view by using the $currentCustomfieldValue variable with one of the function intList(), stringList(), or serialize(<string>).
All details about these functions could be found in our documentation.
This is the Display view query that will retrieve the multiple selected values by using the $currentCustomfieldValue variable (which contains the field Keys).
$.continents[?(@.id in [$currentCustomfieldValue.intList()])]
Here's a sample issue with the field displaying multiple values:
And here's the above Display view query and how it was evaluated against the selected values:
In case the field Key stores strings and not integers (i.e. Key was set on continent name), the Root element query should be adjusted as below:
$.continents[?(@.continent_name in [$currentCustomfieldValue.stringList()])]