Select to view content in your preferred language

Pull and update data in hosted feature layer using survey123

220
3
Jump to solution
03-06-2025 08:38 AM
TKSHEP
by
Frequent Contributor

I am trying to use Survey123 barcode scanning to pull data in from an already existing hosted feature layer then update that layer.  What would be the best way to perform this process?

0 Kudos
1 Solution

Accepted Solutions
DavidSolari
MVP Regular Contributor

I don't see any way of pulling the access token from Survey123, and even if it was public data I don't see a way to set a message body for a request so I don't see a way to smuggle an update into a pulldata call. Even if you could, would you want your data to be updated at arbitrary points in the form's lifecycle instead of through a defined webhook? No matter how you slice it, trying to update arbitrary layers from a form is a bad move.

View solution in original post

3 Replies
DavidSolari
MVP Regular Contributor

As you probably guessed, you can pull data by passing the barcode data into a pulldata("@layer") function and working with the results. To my knowledge there's no documented way to update another layer using a Survey123 form without looking into webhooks.

0 Kudos
TKSHEP
by
Frequent Contributor

What if I am trying to update that same layer I am pulling from?

0 Kudos
DavidSolari
MVP Regular Contributor

I don't see any way of pulling the access token from Survey123, and even if it was public data I don't see a way to set a message body for a request so I don't see a way to smuggle an update into a pulldata call. Even if you could, would you want your data to be updated at arbitrary points in the form's lifecycle instead of through a defined webhook? No matter how you slice it, trying to update arbitrary layers from a form is a bad move.