Select to view content in your preferred language

Adding a Repeat to an exisiting feature service

02-26-2020 05:25 AM
Occasional Contributor II

I am running into a problem where I want to use the InBox to edit existing features in a feature service. I crated my survey from the feature service. As I tested the resulting survey, I discovered the issue where I am not able to add photos. Looking through GeoNet, the solution is to nest the image question in a repeat. I edited the Excel spreadsheet with the repeat and tried to republish. I received a "The custom feature service <submission url> is not compatible with this survey (Table <Table_Name> not found). I am assuming that I am getting this error because I did not create the feature service with the table. Has anyone else run into this issue where you need to add a repeat/table to a feature service created outside of S123, and you can't because the table is not already created? I tried a bunch of solutions and none of them have worked so far.

Any help you can provide is greatly appreciated.

Chris Anderson

Florida Fish and Wildlife Conservation Commission

Tags (3)
3 Replies
by Anonymous User
Not applicable

I have a quick question for what you are attempting to truly accomplish with this post? Are you wanting to add in multiple photos to the initial survey or do you want to have a true repeat that contains other questions along with the photo? If you are attempting to just add multiple photos to the original survey, then this should be fairly easy to accomplish. However, if you are in need of adding a repeat to record additional information, then this is might be more challenging to accomplish and requires some testing.

I know that if you are simply attempting to add multiple photos to the initial survey feature geometry, then you could do the following -

  1. Login to ArcGIS Online and find the details page for your survey's hosted feature service
  2. Then you will need to "Enable attachments" for the Survey Feature service
  3. Open Survey123 Connect
  4. Open the Excel spreadsheet used and add in multiple image questions.
    1. Keep in mind that the photos will inherit the question name as part of the attachment/photo name.
    2. SurveyPhoto1
    3. SurveyPhoto2
    4. SurveyPhoto3
    5. SurveyPhotoX
  5. Republish your survey
  6. Re-download the survey to your field app and open the form
  7. You should be able to add in multiple photos for the survey.

I have tested this above and it works as expected.

If you are looking to enable a repeat that creates a related table to hold additional information, then you might be able to complete this is a different manner and I am unsure if this would work? I have not tried this, but in theory (PLEASE TEST ON A SAMPLE DATASET) you should be able to

  1. download your hosted feature service
  2. Open this copy within your Desktop or ArcGIS Pro
  3. Within the FGDB that you downloaded you would create a new table
    1. Name of this table will be used within the repeat question within the Survey123 Excel file
    2. Create all of the data field names(name column in S123 excel) and associated alias's (label column is S123 excel) that you want to capture within the Survey form
      1. Take notes as you will in turn use this same exact data field schema within your Survey123 Excel file
    3. Create a data field that is named "parentglobalid" and is a "GUID" data type
  4. Within Catalog you will need to create the relationship to match that of Survey123 uses for the HFS created by Connect.
    1. Name of the Relationship Class will be the same as the Table that you created above
    2. Origin Table/Feature Class would be the Survey Feature Class
    3. Destination Table/Feature Class would be the new table you created.
    4. Type of relationship would be "Composite"
    5. Accept defaults for labels
    6. Notifications would be "None"
    7. Cardinality would "1 - M (one to many)
    8. No, I do not want to add attributes to this relationship class.
    9. Primary Key would be the "globalid" field from the Survey Feature Class
    10. Foreign Key would be the GUID field from the table you created named "parentglobalid"
  5. Now I would pull this Feature class and the newly created/related table into ArcMap or ArcGIS Pro and test to see if the relationship has been established.
  6. If all is good, then you will need to publish this while "Overwriting an Existing Feature Service" (THIS is why it is important to test this out first).
    1. The idea is that since you downloaded the original dataset and are using it to overwrite that you would not loose any of the data.
    2. However, I do believe this could interrupt any other web maps, web apps, operations dashboards that are using "pop-ups". You will need to recreate them.
  7. Within your Survey123 form you will have to do the following
    1. Open the survey form.
    2. Add a repeat that contains the same name as the new table you created.
    3. Add in all of the data fields and have them match the data schema exactly
    4. Add in an image question
    5. Try to republish your survey and hopefully it works.
  8. Then download the re-published survey form and test out the form.

This is very tricky in nature and I have NOT tested the second option on a live service, but it depends on what your end goal is for this survey? The original survey with multiple photos attached to the feature being created (option 1) or a survey that contains one feature with a related table that contains additional information along with photos?

Good Luck!


New Contributor II

Did anyone try this solution?

Occasional Contributor III

Curious if there was a solution to this....

I am trying a similar thing but with a NON-Hosted Feature Class...

  • I created a S123 Form and published it. 
  • I then registered a Feature Service in Portal that has the same schema as the form
  • I then updated the Submission URL to point to the Feature Service ID in Portal that points to my SDE Feature Class via Portal. and republished the Form from S123 Connect.

This works great.... and the SDE data is being updated.

Now the parameters of the project changed and I need Multiple Images not one like the form originally had. 

  • So I thought I would just go into the S123 Connect and add a Repeat around the image.  
  • I added the Repeat around the image and tried to Republish

I tried this and got an error ... The Feature Class/ REST Service  should be fine... At Has Attachments Enabled and this




0 Kudos