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"
}]
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.
I doubt you can get what you're after in the OOTB query operation, as outStatistics won't support parameter other than groupByFieldsForStatistics, orderByFields, time, 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 groupByFieldsForStatistics, orderByFields, time, and where.