Select to view content in your preferred language

AGOL popup displays 'no info avail' when using arcade expression

939
3
Jump to solution
03-04-2021 09:06 AM
aroininen
Occasional Contributor

Hello again folks

I created a Groupby expression in arcade that shows the results I want and it works when I test

GroupBy($layer, ['PRStatus'], [ { name: 'Total', expression: 'PRStatus', statistic: 'count' } ])

When I add this expression to the popup I get a "No Information available" result, other fields are not displayed either

I would like to display the summery of  the PR status field for the whole dataset (not the ROWID if possible)

 

Thanks again for your time

Aaron

results from TEST:

aroininen_0-1614876999033.png

when I add this expression to the popup I get this result, other fields are not displayed either

aroininen_1-1614877246785.png

popup

aroininen_2-1614877272719.png

 

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

Hi @aroininen ,

In your example, you are returning a featureset that will display the test as you can see, but it will not show in the pop-up. You need to loop through the resulting features and form a text that can be displayed in the pop-up.

Please have a look at this post where you will find and example of how to do this: https://community.esri.com/t5/comunidad-esri-colombia-ecuador/incluir-reportes-estad%C3%ADsticas-en-... (the post is in Spanish but  it contains some code blocks that show the way to process the information) or have a look at this blog post by Paul Barker: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/whats-new-in-arcade/ 

View solution in original post

3 Replies
XanderBakker
Esri Esteemed Contributor

Hi @aroininen ,

In your example, you are returning a featureset that will display the test as you can see, but it will not show in the pop-up. You need to loop through the resulting features and form a text that can be displayed in the pop-up.

Please have a look at this post where you will find and example of how to do this: https://community.esri.com/t5/comunidad-esri-colombia-ecuador/incluir-reportes-estad%C3%ADsticas-en-... (the post is in Spanish but  it contains some code blocks that show the way to process the information) or have a look at this blog post by Paul Barker: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/whats-new-in-arcade/ 

aroininen
Occasional Contributor

Thank so much this helped!!

0 Kudos
Sergio
by
Emerging Contributor

Hi @XanderBakker ,

Could you please expand a bit on this with quick and dirty example?

I could manage to output values with this code:

var woNumber = $feature["wonumber"]
var woStagesSet = FeatureSetByName($map,"DdditionalDataset", ['wo', 't_code', 't_name'], false)
var filteredEQNumberSet = Filter(woStagesSet, 'wo = @woNumber')
var textForPopup = ''
for (var k in filteredEQNumberSet){
textForPopup += k.wo + k.t_code + k.t_name + TextFormatting.NewLine
}
return textForPopup

But the output looks not formatted and with no spaces. Ideally I would like to get the output as a table.

Could you please advise how to do this?

Thank you!

Regards

0 Kudos