Create Survey containing multiple attachments (photos) from Collector feature layer

1674
1
Jump to solution
03-29-2021 07:39 AM
DavidBooth
New Contributor II

It's easy enough to create a new survey by pointing to an existing feature layer hosted on AGOL and using that feature layer as the submission URL in the survey. But if that feature layer supports attachments (photos) and there are multiple photos/attachments, then how does this get passed to the survey?

After creating the new survey from the existing feature layer, there is a single image question created, but since the feature layers has multiple attachments for one point - shouldn't the survey be creating the image question within a repeat so it could display multiple photos? Is this possible? If not, is it something that is planned?

The goal of this process is to create and generate automated custom PDF feature reports from Survey123, but using a feature layer that is updated by Collector users as the data source. It looks like this approach would work great, except if Collector uses have multiple photos associated with each point in the feature layer - how do I get all those photos passed to Survey123 unless they are inside a repeat?

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @DavidBooth,

Due to the way that attachments are stored in a feature layer or related table, we are unable to determine how many image or file questions there should be created, or if multiple images are required via multiline appearance on an image or file question. When image questions are inside a repeat, the attachments will be associated to the related feature layer/table, not to the parent. If you want multiple photos on the parent layer, use the multliline appearance.

When you create a survey from existing feature service, we simply check to see if attachments are enabled for that feature layer or table, and if they are we automatically add a single image question in the xlsxform template created. You can then modify the template manaully to match your requirements. For example add additional image or file questions in the parent layer or repeats, or add multiline appearance to the image or file questions. Provided attachments is enabled on the service, this will work as expected when published.

Regards,

Phil.

View solution in original post

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi @DavidBooth,

Due to the way that attachments are stored in a feature layer or related table, we are unable to determine how many image or file questions there should be created, or if multiple images are required via multiline appearance on an image or file question. When image questions are inside a repeat, the attachments will be associated to the related feature layer/table, not to the parent. If you want multiple photos on the parent layer, use the multliline appearance.

When you create a survey from existing feature service, we simply check to see if attachments are enabled for that feature layer or table, and if they are we automatically add a single image question in the xlsxform template created. You can then modify the template manaully to match your requirements. For example add additional image or file questions in the parent layer or repeats, or add multiline appearance to the image or file questions. Provided attachments is enabled on the service, this will work as expected when published.

Regards,

Phil.

0 Kudos