Repeats from a SQL hosted feature service

997
4
Jump to solution
07-21-2020 09:52 PM
GavinWepener
New Contributor II

I am having issues getting the repeats going for attachments on a feature service published with data that resides in a SQL  database. If I do not use repeats, the survey works 100%, but using repeats I do not know to which related table I need to point the repeat.

 My schema in Survey123 looks this. 

How I try to do the repeat and the error that I get when I try to publish the survey. 

How do I set up the repeats if my feature service is not hosted but uses data from SQL?

Thanks

Gavin

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
GavinWepener
New Contributor II

Good morning Zachary

My issue was resolved by ESRI South Africa. When publishing a feature service from a layer hosted in SQL, it does not create a related table. Thus repeats does not work. So instead of having one repeat to capture several photos, you need to have several questions capturing one photo / attachment at a time.

image

photo1

Photo1

image

photo2

Photo2

View solution in original post

0 Kudos
4 Replies
ZacharySutherby
Esri Regular Contributor

Hello Gavin Wepener‌, 

If you are creating a survey from an existing feature service the repeats should automatically populate with the related tables on the service. 

If you are trying to create a survey that matches an existing feature service the name of the repeat needs to match the name of the table from the REST endpoint. 

For example in my test survey the name of my related table was TenEightDB.SDE.defects, when I created my survey based on that service that is the name that populated the repeat: 

This matches what is present on the REST endpoint: 

If you do not see your related table on the REST endpoint it may be likely the table was not present in ArcGIS Pro or ArcMap when publishing the data. 

Thank you, 

Zach 

Thank you,
Zach
0 Kudos
GavinWepener
New Contributor II

Hi Zachary

Thanks for this, but I suspect my issue is how I publish my feature service. When I publish a feature class that resides in SQL, to a feature service on my portal, the related table goes to my map service and not to my feature service. 

How do I publish / set up my feature class in order for the related table to go to the feature service and not to the map service?

Thanks

Gavin

0 Kudos
GavinWepener
New Contributor II

Good morning Zachary

My issue was resolved by ESRI South Africa. When publishing a feature service from a layer hosted in SQL, it does not create a related table. Thus repeats does not work. So instead of having one repeat to capture several photos, you need to have several questions capturing one photo / attachment at a time.

image

photo1

Photo1

image

photo2

Photo2

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello Gavin Wepener‌, 

I am glad the issue has been resolved! When publishing with a related table from any database management system as long as the database is a Geodatabase you should be able to publish a feature service with a related table. 

Please use the second to last point in this documentation for reference: Prepare data to publish a feature service—ArcGIS Server | Documentation for ArcGIS Enterprise 

As for the workaround with the attachments, when ArcGIS Survey123 3.10 releases the ability to add multiple photos to one image question will be supported. This can be done with the multiline appearance. 

There are builds in the Early Adopter Community that can be used for testing. 

Thank you, 

Zach 

Thank you,
Zach
0 Kudos