GroupBy returns Domain Codes - how to get Domain Names?

85
0
01-21-2022 04:32 PM
Labels (1)
Wolfgang_Grunberg_AZ_DFFM
New Contributor III

Data Expressions for Dashboard's List widget is a joy!

The following code works well but only returns Domain Codes.

Can DomainName($feature, 'Trap_Region') somehow be used to get Domain Names?

var portal = Portal('https://www.arcgis.com/');
var fs = FeatureSetByPortalItem( 
    portal, 'XXXXXXXXXXXXXXXXXXXXXXX', 
    1, 
    ['Trap_ID','Trap_Region'], 
    false
);

// Trap count grouped by trap region
var fs_gp = GroupBy(fs, ['Trap_Region'], [{name: 'Total_Traps', expression: 'Trap_ID', statistic: 'COUNT' }]);

return fs_gp

 

0 Replies