Select to view content in your preferred language

Filter Details Widget by Attachments

827
3
Jump to solution
05-01-2023 05:39 AM
StephenKaranja
Regular Contributor

Hi All,

Is it possible to filter the Details widget of the dashboard such that it only shows records that have a photo attachment? It only seems to allow filtering by the other value fields. Let me know, thanks.

Regards,

Stephen Karanja

0 Kudos
1 Solution

Accepted Solutions
kmsmikrud
Frequent Contributor

Hi  Stephen,

Sure for hosted feature layers you can calculate the photo field in AGOL or Portal by clicking on the field 'Calculate' and typing in the statement in the first screenshot. Alternatively in ArcGIS Pro you can calculate the Photo field by right-clicking on the field 'Calculate Field'  (2nd screenshot).

In addition here is an Esri ArcGIS Blog on attachments including the Count statement

 

Arcade_AGOL.jpg

Arcade_ArcGISPro.jpg

Thanks,
Kathy

View solution in original post

0 Kudos
3 Replies
kmsmikrud
Frequent Contributor

Hi @StephenKaranja ,

I'm not sure on directly filtering attachments, but I have added an additional field to the hosted AGOL feature layers called 'Photos', basically a photo count of attachments and then populated this field by using arcade expression  Count(Attachments($feature)) 

This way I can filter out features that don't have any photos by Photo > 0. 

Hopefully this info is useful.

Thanks,
Kathy 

0 Kudos
StephenKaranja
Regular Contributor

Thanks a lot @kmsmikrud for your response. It should work well for me. I've created the new field. Where do you type in the Arcade expression? Let me know, thanks.

Regards,

Stephen

0 Kudos
kmsmikrud
Frequent Contributor

Hi  Stephen,

Sure for hosted feature layers you can calculate the photo field in AGOL or Portal by clicking on the field 'Calculate' and typing in the statement in the first screenshot. Alternatively in ArcGIS Pro you can calculate the Photo field by right-clicking on the field 'Calculate Field'  (2nd screenshot).

In addition here is an Esri ArcGIS Blog on attachments including the Count statement

 

Arcade_AGOL.jpg

Arcade_ArcGISPro.jpg

Thanks,
Kathy

0 Kudos