output statistics count returns all fields

1284
2
04-03-2021 10:31 AM
bcasu
by
New Contributor II

I am trying to run a query with some output statistics to determine a count of the numbers of copies I have of each item based on the 'Call_Number' this seems to work okay but it only returns the count and the call number, not the rest of the attributes for each item. Here is a simple example of what I am looking to do:

Title: sheet1, Date: 1900, Call Number: 1234

Title: sheet1, Date: 1900, Call Number: 1234

Title: sheet1, Date: 1900, Call Number: 1234

In this case, there are 3 versions of an identical record. I would like it  to show in the query, 1 record, the number of copies, and all of the attributes. For example it would return:

Title: sheet1, Date: 1900, Call Number: 1234, Copies: 3

Here are the outputstatistics I am using. Any help would be appreciated! 

[{
"statisticType": "count",
"onStatisticField": "Call_Number",
"outStatisticFieldName": "Copies"
}]

 

 

Tags (3)
0 Kudos
2 Replies
DavidPike
MVP Frequent Contributor

Perhaps you could create a custom field and use Arcade to concatenate the fields you want into it.  Then run the statistics COUNT against that field, but just a shot in the dark.

0 Kudos
by Anonymous User
Not applicable

I doubt you can get what you're after in the OOTB query operation, as outStatistics won't support parameter other than groupByFieldsForStatisticsorderByFieldstime, and where as outlined in doc. That means outFields which you're after not working. 

 When using outStatistics, the only other parameters that can be used are groupByFieldsForStatisticsorderByFieldstime, and where.

0 Kudos