Select to view content in your preferred language

Enable attachment in hosted feature layer - assign a relationship field

597
1
Jump to solution
08-30-2023 05:39 AM
cat206
by
Occasional Contributor II

Hi All, When you used the Enable attachements toggle on the layer settings in AGOL:

cat206_0-1693399001004.png

 

does anyone know which field the relationship is assigned to? Object ID or Global ID perhaps? And does anyone know if there is a way to assign it to another field, such as an "Asset_ID" String field? I'm looking to ensure the Asset ID is included in the attachment title when exported the photos

 

0 Kudos
1 Solution

Accepted Solutions
MiguelParedes
Esri Contributor

Greetings @cat206 

When one activates Enable Attachments on a hosted feature service layer, what I believe happens in the background is that a relationship table and a corresponding relationship class are created, so there is no way of modifying anything that I know of.

If you were to export the layer in question as an FGDB, download it, extract the FGDB from the zip file and then open the FGDB in ArcGIS Pro, you should be able to see both the related table and relationship class. Checking these further should show the details of the relationship and the fields used to set it up; something like the following:
Uq60nUeocf.jpg

Hope the above helps.

Miguel

View solution in original post

0 Kudos
1 Reply
MiguelParedes
Esri Contributor

Greetings @cat206 

When one activates Enable Attachments on a hosted feature service layer, what I believe happens in the background is that a relationship table and a corresponding relationship class are created, so there is no way of modifying anything that I know of.

If you were to export the layer in question as an FGDB, download it, extract the FGDB from the zip file and then open the FGDB in ArcGIS Pro, you should be able to see both the related table and relationship class. Checking these further should show the details of the relationship and the fields used to set it up; something like the following:
Uq60nUeocf.jpg

Hope the above helps.

Miguel
0 Kudos