Search code examples
gramex

Gramex-FormHandler-Filter-unique values of a column using url-param


Gramex Form Handler: Filter doc sepcifies: Note: You can use FormHandler to render specific columns in navbar filters using ?_c=<data-column>.

Also in the following section You can specify custom aggregations using ?_c=col|<pandas-aggregation>, but it only lists count, min, avg, max as the samples.

if I try with ?_c=<data-column>|unique to get the list of unique values of any column? it's returning a list of empty-objects: [{}, {},{} ...., {}].


Solution

  • ?_by=data_col&_c=data_col|unique gives the result as a list: [{"data_col":"val1","data_col|unique":["val1"]},{"data_col":"val2","data_col|unique":["val2"]}...]