Select to view content in your preferred language

Survey using existing feature service won't submit

1087
11
10-28-2022 01:02 PM
DamonBreen
Regular Contributor

I have a map that I have created and uploaded to AGOL that will have an office user input for the first third of the fields in a given layer. I created a survey123 form from the existing feature service of the map that was created, and when I try to submit a response on the web app, it fails to send and gives me this error:

Failed to submit. 

  • - String or binary data would be truncated in table 'db_51652.user_51652.PORTLAND_LEAK_MAP_2023_WFL1_GAS_LEAK', column 'LeakID'. Truncated value: '{E5CE8770-69B7-455C-'. The statement has been terminated

In the map side, I have a GlobalID, and I have a text field called LeakID. It almost looks like when I try to send a survey, it is for some reason trying to put the GlobalID in the LeakID field. The leakID column only has a field length of 20, so I would understand why I am getting the error, but I don't understand why the survey is trying to put a value in for LeakID anyhow. Can anyone tell me what is going on here? This seemed like it would be a pretty easy process, but I have been fighting with this for a while now.

 

Thanks,

Damon

0 Kudos
11 Replies
DougBrowning
MVP Esteemed Contributor

Field Maps will populate the relationship key for you that is why.  Not sure why it would get a globalid though.  When you say "The children are not tied in with the survey123"  where does 123 come in then?  That part lost me.  I do these related forms a lot.  I have some projects with 15 of them.  Reach out to me on PM if you like this may be hard to figure out via chat.  

0 Kudos
ChristopherCounsell
MVP Regular Contributor

As @DougBrowning indicated there's a few gaps in the workflow that we need to see to better assist. Can you provide:

  • The original XLSForm / data structure? If you don't have one, can you create a new survey from the existing feature service and leave the XLSForm as-is? This will let us see the layers in the service and their names
  • The custom URL scheme used to launch survey123 from the map. If possible, share the the configuration (layer pop-up settings) and a sample (copy link from a single feature pop-up)
  • A simple workflow design for the above. i.e. collect a point, then capture a related record in survey123 via the URL scheme. Or collect a point, then edit the existing point in Survey123 to use more complex forms?

You should definitely fix any data validation errors in Survey123. Using reserved words as field names causes unexpected behaviour, often down the track and not at the time of publishing. The 'State' field is one. identified by Doug. Another is the form_id is set to 'Gas leak'. Tables shouldn't have a space in them. If it's the parent layer (0) in the service you don't need to specify the form.
The 'name' column in the choices sheet should also not be using special characters but that shouldn't be an issue for what you are seeing here.