Select to view content in your preferred language

How to allow the user to upload an image to store in a field of type Attachment in a table

230
3
Jump to solution
11-13-2024 05:06 AM
Labels (1)
Rijswijk_dev
Emerging Contributor

I am trying to build a simple app where the user can upload an image from her / his device to be stored in a table in a field of type Attachment together with some other info.

There is an Add Data widget but this does not allow the user to upload images.
The Edit widget does not link to the attachment type field.
The image widget does not allow a user to upload an image.
I found this post:
https://community.esri.com/t5/arcgis-experience-builder-questions/uploading-attachments-via-edit-wid...
where the suggestion was made to use the Survey widget but using a survey just to upload an image seems overkill to me.

Is there a way to accomplish this with the functionality available in the arcgis online experience builder ?

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

For Hosted Feature Layers, attachments are stored in a related table. You can't add an 'attachments' field and directly insert them.

You'll need to enable attachments on the layer and then you should see the ability to add attachments when editing the feature. It won't be configured as a field in a form.

https://doc.arcgis.com/en/arcgis-online/manage-data/manage-hosted-feature-layers.htm#ESRI_SECTION1_3...

View solution in original post

0 Kudos
3 Replies
ChristopherCounsell
MVP Regular Contributor

For Hosted Feature Layers, attachments are stored in a related table. You can't add an 'attachments' field and directly insert them.

You'll need to enable attachments on the layer and then you should see the ability to add attachments when editing the feature. It won't be configured as a field in a form.

https://doc.arcgis.com/en/arcgis-online/manage-data/manage-hosted-feature-layers.htm#ESRI_SECTION1_3...

0 Kudos
Rijswijk_dev
Emerging Contributor

Note:
I accepted the answer as solution to state that the discussion has completed. But it is not a solution in the technical sense. I am really surprised that there is no widget in one of the no / low code builders which allows the user to upload an image.

Where can I file a feature request ? 🙂

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Adding attachments is entirely possible. It is called 'editing' and the users will need the privileges to add or update features AND attachments need to be enabled on the layer. They are in a related table as it's a one to many relationships, but the interaction is still through the feature.

Attachments are stored in a related table and are typically visualised in the pop-up or some tables.

Most apps or widgets that support editing will support attachments if they are enabled on the layer. Here's a guide for experience builder:

https://support.esri.com/en-us/knowledge-base/how-to-add-or-edit-attachments-in-arcgis-experience-bu...

If you want to create an idea for the 'attachment field' I'd encourage you to add reasons why it's important and why the above does not work. You can create ideas here:

https://community.esri.com/t5/arcgis-experience-builder-ideas/idb-p/arcgis-experience-builder-ideas

0 Kudos