Here's a simplified version of a JSON array which I am getting back from a Jira REST endpoint. I store the issues in a PowerApps collection called jiraRawData.
"issues":[
{
"id":"1",
"assignee":null
},
{
"id":"2",
"assignee":{
"displayName":"john"
}
},
{
"id":"3",
"assignee":{
"displayName":"john"
}
},
{
"id":"4",
"assignee":{
"displayName":"mary"
}
}
]
I want to display issues in a Gallery component and I can do that no problem.
However what I would like to do is to display the unique assignee names only so for the input above I would just like to see the following in my gallery
john
mary
Any help greatly appreciated.
hi @slong can you perhaps add some screen shots
I created Collection _Jira and found this
The the distinct function Distinct(_Jira,assignee)
@rubin_boer I've tried what you've suggested above. Still having an issue. Screenshots below as requested. I load my Collection using the following line
ClearCollect(jiraRawData, JIRACloud.GetIssuesForJQL("project = MYPROJECT AND issuetype in (standardIssueTypes(), subTaskIssueTypes(), Bug, Epic, Spike, Story, Task, Bug-Subtask, Sub-task) AND status in (Blocked,"&Char(34)&"In Progress"&Char(34)&", Open) AND fixVersion = 11.0.0 ORDER BY created DESC").issues);
I think my issue seems to be that I can't do this. How would I get around this seeing as displayName only exists within assignee sometimes. Otherwise assignee is null.
Distinct(jiraRawData, assignee.displayName)
You may want to filter the data to get the non-null ones, before using Distinct to get the unique list of displayName values.
Distinct(Filter(Issues, !IsBlank(assignee)), assignee.displayName)
User | Count |
---|---|
247 | |
105 | |
82 | |
50 | |
43 |