I have a hosted table with many records and would like to create a view layer from this that only shows the most RECENT record.
I've created a view layer and attempted to update the view definition using the TOPFILTER via the admin API.
Original Layer Definition:
{
"adminLayerInfo" : {
"tableName" : "db_4176.user_4176.CASES_TABLE_CASES_TABLE", "geometryField" : null,
"xssTrustedFields" : "",
"viewLayerDefinition" : {
"sourceServiceName" : "Cases_Table",
"sourceLayerId" : 0,
"sourceId" : 984,
"sourceLayerFields" : "*"
}
},
"id" : 0,
"name" : "Cases_Table",
"type" : "Table",
"isView" : true,
"isUpdatableView" : true,
"sourceSchemaChangesAllowed" : true,
"displayField" : "",
"description" : "",
"copyrightText" : "",
"defaultVisibility" : true,
ETC...
I think I need to insert something like the following, but can't get it to work successfully:
"viewLayerDefinition" : {
"topFilter" : {
"orderByFields" : "reportdt ASC",
"topCount" : 1
}
}
Does anyone have an example of successfully using topFilter (or some other method) to filter a layer view down to just the most recent record? This is in support of a COVID-19 project.
Thanks
Jay
Jay
Washoe County GIS