If you used a Data Expression, you could create a filter based on whether the URL was null or not, but then you might have trouble connecting that selector back to the original data, unless that Data Expression also was referenced by most of your other non-map widgets.
var portal = Portal('your portal url')
var fields = [
'array',
'of',
'field',
'names',
'you',
'need'
]
// make sure the objectid is one of the fields you include!
var fs = FeatureSetByPortalItem(
portal,
'itemid of service',
0, // or whatever index the layer is
fields,
False
)
return GroupBy(
fs,
fields,
{
name: 'has_pr',
expression: 'CASE WHEN press_release IS NULL THEN 0 ELSE 1 END',
statistic: 'SUM'
}
)
In short, this would basically give you back the same set of features you put into it, with all the same fields, but with a new field tacked on, called has_pr. This field will be a 0 when the press release URL field is null, and 1 when it has a value present.
You'd be able to configure any non-map widgets to look at this Data Expression to show things like a list, statistical indicators, and the like, and interactions with other widgets like a list or chart could be used to filter features in the map by linking their objectid fields.
- Josh Carlson
Kendall County GIS