AnsweredAssumed Answered

I need to return unique values in a list widget?

Question asked by gerald.sneary80 on Jun 18, 2020
Latest reply on Jun 23, 2020 by ngolabi-esristaff

Hi,

 

I've written the expression below to return unique values, in a list widget, from the field "Department__udf_". This table is tracking who is coming and going from our building. I only want to show the individual departments for the day.

var dept = distinct($datapoint["Department__udf_"])
return {
  //textColor: '',
  //backgroundColor: '',
  //separatorColor:'',
  //selectionColor: '',
  //selectionTextColor: '',
   attributes: {Department_udf: dept
    // attribute1: '',
    // attribute2: ''
   }
}

The above expression returns below. 

I would like only one instance for each department. Is this possible?

Xander Bakker

Outcomes