URL Parameters with Attachment Viewer

602
4
02-09-2024 02:38 PM
Labels (2)
CDunlevy
New Contributor

I am currently trying to create an Experience builder application with an embedded attachment viewer app. 

Now I am currently trying to implement URL parameters to the application, so that an ID field can be passed (Not the Object ID, a separate field) to immediately select a point on the map. 

Now from the documentation, the only URL parameter the attachment viewer can use for identification is object ID, however webmap does support many different fields being passed in the parameters. 

 

My questions are: 
1. Is there a way to insert a different field for use in attachment viewer to select a point? 

2. Is there a way to gather the objectID using another specified field in the experience builder app and then send that through the embedded app? 

3. Any other ways I could work around this?

0 Kudos
4 Replies
ChristopherCounsell
MVP Regular Contributor

Attachment Viewer is an instant app. It's designed as a quick and easy template to view results, photos/attachments. I wouldn't view embedding Experience Builder in Attachment Viewer as a standard workflow.

You will be much better off just building the entire thing in Experience Builder. The List Widget supports showing attachments for features selected in the map.

Tiff
by
Frequent Contributor

Hi @CDunlevy, thanks for posing this question. I am now looking into the attachment viewer URL parameter using object ID. I could have sworn I saw documentation about using the object ID but now I cannot find it. Could you send me the documentation link or the correct syntax to use object ID in the URL? Thank you!!!

0 Kudos
JosephRhodes2
Frequent Contributor

I replied to your other post, but for anyone coming across this post, here's how I did this:


1. In the app configuration, go to Interactivity -> Share, and toggle on Sharing.

2. Publish then open the app and select any feature by clicking on it.

3. Click the Sharing button, then Copy Link. This copies a shortened link to the clipboard.

3. Paste the link in the address bar and press Enter to load the app. This changes the shortened link to the full link in the address bar. It looks like this: 

 

https://civiclens-demo.maps.arcgis.com/apps/instant/attachmentviewer/index.html?appid=bc91f23560d9436fa069f28d980db38c&defaultObjectId=14&attachmentIndex=0&layerFeatureIndex=0&selectedLayerId=190ffe37ae2-layer-4&center=-114.05;46.8919&level=19

 


4. From my testing, you can just swap out the defaultObjectId value to open the app to the feature of interest. You can also omit the layerFeatureIndex parameter (I'm not sure what it does), but it looks like you need most or all of the others. 

Hope this helps.

0 Kudos
Tiff
by
Frequent Contributor

Hello @JosephRhodes2, thanks! Great idea to find that from the shared URL. In my other post, I discovered the right formatting for the URL parameter but realized it only works for map-focused and not attachment-focused configuration. I believe Esri is working on fixing that bug!

0 Kudos