Hi,
I want to aggregate a multivalue choices colomn using this article :
But i don't understand where the colomn "_tags" is coming from ? This colomn has to be created ?
My colonm is named "Injury" (type choices ; multiple selections enabled).
So i tried to adapt the code present in your article :
handlers.requestSuccess = function(data, logger) {
//here we will create new set of items
var items = ;
//we go through each item from the list
data.items.forEach(function(item) {
//if it has _Tags:
if (item.Injury) {
//for each tag:
item.Injury.forEach(function(tag) {
//we create new object and add it to our items:
items.push({
tag: tag.get_choices(),
count: 1
});
});
}
});
//we replace default items with our items:
data.items = items;
return true;
}
I tried to insert the function "get_choices" but it doesn't exist. Here is the error i get
Request failed: TypeError: tag.get_choices is not a function
I am sorry, i have no knowledge of java script.
Can you help me ?
Regards,