Hi all,
I am struggling to use the group by operator in a list rows connect. How do I correctly adress the
field containing the owning userid or username. What is different when the owner is a team?
I have tried OwningUser OwningUSer/systemuserid and other variations as well in the group by operator and
always get error messages. In my case the owner is always a team.
Hi @OlafStetzer ,
For your scenario where owner is teams then use
groupby((owningteam),aggregate(<fieldname> with aggregate(sum,max,min) as 'Alias Name'))
Thanks
Thanks for offering help. I got a step further but still get error messages. Sorry, I probably would know how to do that in SQL but the odata syntax is still a big mystery to me and I do not find good and easy to understand documentation on dataverse (which version of entity or column name or relationship table is need when etc....).
This is what I get so far:
"$apply": "groupby((owningteam),aggregate($count as Count))"
leads to error message:
$apply/groupby grouping expression 'owningteam' must evaluate to a property access value.
And
"$apply": "groupby((owningteam/name),aggregate($count as Count))"
'Team' entity doesn't contain attribute with Name = 'ownerid' and NameMapping = 'Platform'.
Maybe I shall explain in more depth what I want to accomplish:
I have a dataverse table where I create several new entries with different owning teams (in that same flow).
At the end I want to generate one email per Owning team (to all Team members) with a list of the new entries I generated in that flow.
I am struggling at point one where I want to create a list of distinct Team Names for the list of new entries.
This I want to use subsequently to filter the list of previously generated entries by Owning Team.
But maybe there is a much simpler way of getting the whole task done.
Hi @OlafStetzer ,
In aggregate transformation text box just use :
groupby((owningteam),aggregate(<fieldname> with aggregate(sum,max,min) as 'Alias Name'))
field name is schema name .
i.e. groupby((owningteam),aggregate(prefix_name with Count as 'Alias Name'))
Thanks
Hi @OlafStetzer ,
was using groupby function suggested by ManishJain was helpful?