Hi all,
I made an Arcade Expression in the _workers map.
However, when I click on the feature the popup shows just an empty field instead of the expression.
Is Arcade still unavailable in Arcade?
Cheers,
Marco
Solved! Go to Solution.
Marco, Workforce does not support Arcade expressions. We are working on that for our next release scheduled for this year.
Craig
Marco, Workforce does not support Arcade expressions. We are working on that for our next release scheduled for this year.
Craig
Hello, has this be addressed or a solution found? I have the following arcade expressions in my Worker map. The pop up displays correctly in map but is blank in the Workforce app. I have tested this on the iOS version 22.1.1 and Android 22.0.1
First Expression
var returns =FeatureSetByPortalItem(Portal('https://www.arcgis.com/'), 'c9c0de299937441998b55a80689f9cdd', 2,['*'])
var site_id = $feature.site_id
var filterStatement = 'site_id = @site_id'
var relatedData = Filter(returns, filterStatement)
var relatedDataSorted = OrderBy(relatedData, 'visitDate DESC')
// return relatedDataSorted
var popupString = ''
for (var f in relatedDataSorted)
if (f.visitType != 'New'){
popupString += f.visitType + TextFormatting.NewLine +
'Visit Date: ' + Text(f.visitDate, 'DD/MM/YY') + TextFormatting.NewLine +
'Change Status: ' + DomainName(f, 'changeFieldStatus')+ TextFormatting.NewLine +
'Observed Crop Type: ' + f.finalObservedCropType + TextFormatting.NewLine +
'Observed Residue Type: ' + f.finalObservedResidueType + TextFormatting.NewLine +
'Comments: ' + f.comments + TextFormatting.NewLine +
TextFormatting.NewLine
}
return popupString
Second Expression
var returns =FeatureSetByPortalItem(Portal('https://www.arcgis.com/'), 'c9c0de299937441998b55a80689f9cdd', 2,['*'])
var site_id = $feature.site_id
var filterStatement = 'site_id = @site_id'
var relatedData = Filter(returns, filterStatement)
var relatedDataSorted = OrderBy(relatedData, 'visitDate DESC')
// return relatedDataSorted
var popupString = ''
for (var f in relatedDataSorted)
if (f.visitType == 'New'){
popupString += 'Visit Date: ' + Text(f.visitDate, 'DD/MM/YY') + TextFormatting.NewLine +
'Observed Crop Type: ' + f.finalObservedCropType + TextFormatting.NewLine +
'Observed Residue Type: ' + f.finalObservedResidueType + TextFormatting.NewLine +
'Comments: ' + f.comments + TextFormatting.NewLine +
TextFormatting.NewLine
}
return popupString
@CraigGillgrassIs Arcade supported in Workforce yet? I am attempting to show the assignment history in a pop-up by looping through records from a table in the map. So far this only works when the table is related to the feature class I am selecting. I would like to use FeatureSetByName so I can grab values from unrelated tables also.
Thanks,
Ann
Hello @ABorowik are you using ArcGIS Workforce or the Classic Workforce app? If you tap on About, it will display the version number,
Hi Craig,
I am using ArcGIS Workforce in a browser, viewing the Dispatcher map. The pop-up appears correctly in the Dispatcher map preview in configuration and also when the map is opened from AGO contents. But when I open the Workforce project, the values from the arcade expressions are missing.
I have it working now. Only FeatureSetByPortalItem seems to work. FeatureSetById and FeatureSetByName are not working in the Dispatcher map.