Select to view content in your preferred language

How to update coded values of HFS published with Survey123 without overwriting service?

5058
17
Jump to solution
07-11-2017 01:04 PM
TL2
by
Frequent Contributor

Republishing a survey with Survey123 Connect after just updating some Coded Domain Values does update the options within the survey but does not update the domains in the HFS.

How can I update the domains in the hosted feature service without loosing my data.

When I access the Admin Rest endpoint it gives me the option to Update Definition but there is nothing to edit, the Input is blank.

Portal Federated with Server 10.4.1

0 Kudos
17 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Shana

Done. Every request helps bump the issue's priority - but we don't yet have a firm date on when it will be addressed. At the moment we are working on a number of more pressing bugs and enhancements.

We will update this post when we know more.

Thanks

John

0 Kudos
MikeOnzay
Frequent Contributor

I've never had an issue with losing data when republishing a survey against an existing feature service. I'm not using portal.

I've used the following method on a couple of different projects. One was with crowdsource reporter. The other was with a Workforce Project. As opposed to the update definition method I find it easier and safer. I don't have to worry about messing up the JSON.

I have been using the ArcGIS Solutions Deployment Tool add-in for ArcGIS Pro to add, delete and update coded domains in hosted feature services. Once your project is created and the add-in is installed click on Share and then ArcGIS Solutions.

solution button

Double-click on the 3rd item: Configure and ArcGIS Solution

configure

There are 3 steps in this task. The first step is just text to read. Click Next Step. The second step is to add a field (I've never done this). Click Skip. At the third step choose your layer, the field, the type. Make your modifications after the domain appears

modify

Click run and the finish

run and finish

0 Kudos
by Anonymous User
Not applicable

I tried this same process with a Hosted Feature Service that I created using ArcGIS ArcMap and FGDB containing a series of point locations into our AGOL account, then I built a Survey123 Form using Survey123 connect with the create from existing service, I then tried to update the domains, and it corrupted the HFS to the point where we could no longer submit surveys that I had within the "Inbox".

I was very excited to see this utility and was very hopeful to use it within our workflows, but with the testing that I have done...I have had no luck. However, I have not tried to use this on a freshly created service just using Survey123 connect or any HFS that did not contain preexisting data.

Mike Onzay‌ could you describe the workflow that you are using to create the hosted feature services that you are using this utility against?

Thanks,

Mike B

0 Kudos
MikeOnzay
Frequent Contributor

Again, I've never had an issue when republishing a survey from Connect against an existing HFS where all I am doing is updating my choice list. I have to see this before I click publish

publish wo error

In two cases I have felt the need to go through ArcGIS Pro to modify a domain. In both cases it was against a HFS that was built for me. One with Workforce and the other with Crowdsource Reporter. I wanted to change the description label for a particular domain.

My solution may not apply to this thread at all now that I've re-read it a couple of more times. That being said I did do some testing to see what happens if I use this method against an existing HFS that I created using Connect. If I modify the domain by adding an item I would not expect to see it on the form and it is not there. If I add that choice to my choices list that matches the choice I added through Pro and republish the form I get the message that no data will be lost. If I submit a survey and use that choice and then look at the record it is showing the value and not the label. In the screenshot below Cabin John was an existing record before I modified the domain.

sewershed value

0 Kudos
brianvan_druten
Emerging Contributor

I followed the blog post instructions  because we updated our Survey123 pick lists to reflect new nesting bird pairs.  Without updating, I cannot select the proper bird pairs when QC'ing in ArcGIS Pro.  I used JSONLint to validate what I was doing.  It showed a valid JSON.  When I copy it back into the Update Service Definition box I get this error "Invalid definition for 'SourceSchemaChangesAllowed'.
Invalid definition for System.Boolean"

For those that are having issues updating your pick list items in Survey123 and it wiping out your data, what I have found is if the new items you try to add expands the width of the column, it will cause your data to be lost.  For instance if the maximum width item in your pick list is "Frog" and you try to add "Opossum", it will cause an issue.  If you entered "Opos", it should take it with no data loss.  What I have learned as a workaround is if you feel you need to add items later, make sure you at least have one item in there that will account for the maximum width you will need out of that column.  In my example,  putting in "Rhinoceros" would allow you to put in any 10 character item later.

0 Kudos
TL2
by
Frequent Contributor

A better way is to always set the field length when there is a domain.

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

In previous versions of Survey123 the field length for select_one questions was set to be the max length found in the choice list. However, from version 2.7 the app sets the length of all select_one questions to be 255. This removes the need for setting the field length when there is a domain.

Thanks

John

by Anonymous User
Not applicable

Hi @TL2 @brianvan_druten @MikeOnzay @ShanaGail1,

Just wanted to let you know with the upcoming 3.16 October Release of Survey123 we have made improvements to the Connect publishing workflow with regards to domains and choice lists. You can check out the latest announcement, documentation and test out the latest 3.16 beta builds via the Early Adopter Community to get early access to these builds and the new Connect publishing workflows. You feedback on these improvements would be greatly appreciated.

Regards,

Phil.

0 Kudos