It would be good to add the option to return a single occurrence of a given attribute to the Experience Builder list widget, avoiding having to choose to use a support table, or even use the query and filter widgets, which have the same feature.
I managed to almost achieve what I wanted. Perhaps this method can help someone else in the future:
var portal = Portal('https://www.arcgis.com'); var fields = [ 'OBJECTID', 'category', ]; var fs = FeatureSetByPortalItem( portal, '1234567890123456789012345', 0, // or whatever index the layer is fields, False ); var filterfs = Filter(fs, "category IS NOT NULL"); return GroupBy( filterfs, [ 'category', ], [ { name: 'Category', expression: '1', statistic: 'Count', } ] );
Limitations I found: Not able to filter by map extent (as there's no geometry)
@BlakeMorrison It would be possible to retrieve a single attribute value in a Text Widget using a combination of Data Views and Dynamic Text. Probably not in a useful way or what the OP was actually asking about.
This is still needed.
@JeffreyThompson2 - Did you have anything specific in mind?
Agree this would be really useful. For example, if had a point feature of landmarks with type and county columns, and you want to be able to use filters on the type and get a simple list of the distinct counties where that type of landmark can be found.
Currently the only widget that seems to be able to group by unique/distinct values is the Chart widget, but that format doesn't work for everything.
@JeffreyThompson2 There doesn't appear to be a way to get distinct values out of a text field using that method.
https://developers.arcgis.com/experience-builder/guide/text-widget/#dynamic-content-panelHave you looked at the Dynamic Content options in the Text Widget?
投稿、コンテンツのフォローなどにはサインインしてください。初めてですか?無料で登録しましょう。