The Attachment Viewer template is based on the Attachment Viewer web app template from Instant Apps. It provides a native app experience for users to page through a layer's features and review image, video, and PDF attachments with the option to update attribute data.
Requirements
The requirements for using the Attachment Viewer template are as follows:
- Provide one or more Attachment Viewer web apps. These can be a single valid item ID, the ID for a group that contains multiple Attachment Viewer web apps, or a search query that contains multiple item IDs.
- Attachment Viewer web apps can be public or secured. To access a secured web app in your ArcGIS Online organization or ArcGIS Enterprise portal using OAuth2, register your app and provide a client ID. For more information, see Sign your app. By default, only public Attachment Viewer web apps appear in the Attachment Viewer gallery. To access secured Attachment Viewer web apps, click Settings > Licensing > Register and provide a client ID.
Customize your app
Once you create your app, you can customize it by changing the app settings.
Start AppStudio and in the side panel click Settings > Properties. The following table lists the contents of the tabs on the Attachment Viewer Properties tab, sorted by the tab on which they appear, and their purposes. You can also modify the properties directly in the app's appinfo.json file. If you change any of these properties, click Apply to save them before starting your app again.
Start Screen tab contents
Property | JSON name | Type | Description |
---|---|---|---|
Background image | startBackground | String (image URL) | Image to use for the start page background. |
Brand color | brandColor | String (color value) | Color to use as the primary color. |
Title font file | mediumFontTTF | String (font file URL) | Sets the custom title font to be used throughout the app. This font will be used in headings, page titles, and so on. |
Text font file | regularFontTTF | String (font file URL) | Sets the custom text font to be used throughout the app. This font will be used in descriptions of photos, about text, and so on. |
Feedback email | feedbackEmail | String (email ID) | Email address to which user feedback should be sent. |
Show disclaimer | showDisclaimer | Boolean (true|false) | Shows the disclaimer text as a pop-up in the app. This text is the content from the Access and Use Constraints section of the Details tab. |
Gallery tab contents
Property | JSON name | Type | Description |
---|---|---|---|
Attachment Viewer web apps | galleryMapsQuery | String | Enter an ArcGIS query to list valid Attachment Viewer web apps to display in the gallery. This can be a single valid item ID of the web app, such as id:5ae9e138a17842688b0b79283a4353f6, a group ID containing multiple web apps, such as group:52dc7e19ba2f4ea9bb513c02855535,ea, or a search query with multiple web app item IDs, such as (id:5ae9e138a17842688b0b79283a4353f6 OR id:b361c4467db248e7ad55b6e7661e5706). |
Total results to show in the gallery | maxNumberofQueryResults | Number | Enter the maximum number of web apps that should be returned from querying the portal. |
Portal url | portalUrl | String | URL of the Portal to query for Attachment Viewer web apps. |
Support secured web maps | supportSecuredMaps | Boolean (true|false) | Provides the ability to sign in to an organization for access to secured web apps per the query parameters. |
Skip sign in | enableAnonymousAccess | Boolean (true|false) | If Support secured web apps is set to true, setting this option to true provides the ability to bypass sign in and only show publicly available web apps in the gallery. |
Portal sort field | portalSortField | String | Used to sort web apps shown in the gallery. Possible values include title, created, type, owner, modified, avgRating, numRatings, numComments, and numViews. |
Portal sort order | portalSortOrder | String | Specifies the order of web maps shown in the gallery in either ascending or descending order. Possible values are asc or desc. |