Survey123: Inbox will not refresh after deleting fields from feature layer (Error: Invalid query parameters)

249
4
2 weeks ago
Bianca
by
New Contributor II

I have published two surveys from one feature layer. The first survey is for field staff to collect data, and the second survey is for other staff to review and approve submissions (using the Inbox). I recently made an edit to both surveys where I changed the bind::esri:fieldType of two fields to null (the fields are necessary for calculations but there is no need to save them). I then deleted them from the feature layer in AGOL. After doing so, the first version still works fine and submissions are saved to AGOL. But when trying to refresh the Inbox of the second version to review submissions, I get an Error code 400: "Cannot perform query. Invalid query parameters." The deleted fields are not used in the Inbox query.

I re-checked all fields and everything seemed correct, so I copied both versions and published the copies. These test versions work as expected and the Inbox refreshes with no issues. So it seems the issue was caused from deleting fields from the feature service.

Should I not delete attributes from a feature layer if they are no longer needed in the survey? Or what should I have done differently? Is it possible to save this survey, or do I just have to start over with the copied surveys?

Tags (2)
0 Kudos
4 Replies
abureaux
MVP Regular Contributor

"Should I not delete attributes from a feature layer if they are no longer needed in the survey?"

Honestly, I don't bother deleting them. Not because of some best practice. But because I am lazy. I would love it if Connect deleted them for me.

"Or what should I have done differently?"

From what you have described here, probably nothing.

"Is it possible to save this survey, or do I just have to start over with the copied surveys?"

If it's no real trouble to use the copies, that seems like a simple solution. But, getting the original to work would be nice regardless IMO. Have you tried deleting the Inbox Query from the non-functional survey yet? If you do that, the Inbox should work. From there, start adding the query in piece by piece (assuming there is more than one component to it) and see where it breaks.

Bianca
by
New Contributor II

Thanks @abureaux. I did try completely removing the Query expression from the Inbox and it was still returning the same error. I finally gave up and started over with the copies. It would definitely be nice to know what caused the issue as this will come up again. It's still a work in progress and will have several updates as it evolves (but is already being used for data collection). The form is going to be very long with many, many fields which is why I try to clean it up when I can. But I guess next time I will proceed with more caution!

0 Kudos
abureaux
MVP Regular Contributor

Hmm. Getting a query error when there is no query expression shouldn't happen. There may have been something else at play here, like a broken submission URL. I'd like to think that this is a one-off, but keep us updated if it happens again!

0 Kudos
Bianca
by
New Contributor II

Everything seemed to be working okay after starting fresh with the copies, but now I am getting the error again. It's interesting, when I first open the survey and try to refresh the Inbox the first time, I receive the error. But I can click OK and if I try to refresh again it works. On my latest attempt I got the error a message a few times before it worked.

On top of that, I just created a process through the Data Interop extension that reads the feature layer (so nothing to do with the survey that has the Inbox enabled) and the process is failing. I am getting the error "ArcGIS Online Feature Service Reader: Encountered an unexpected error. The error code from the server was '400' and the message was: 'Cannot perform query. Invalid query parameters.'. Details: 'Unable to perform query. Please check your parameters.'"

0 Kudos