Select to view content in your preferred language

Determine which surveys have been completed in Survey123

236
2
10-11-2024 10:05 AM
TomFlahive1
Emerging Contributor

We have a Survey123 Connect app that we use to collect data on about 35 wells. The survey is run once a quarter, and then is reset at the start of a new quarter (older survey records are deleted). The way the app works is that the first field in the app is a dropdown list that shows the names of the 35 wells to be surveyed (which is filled in using a search function). When the user selects a well from the dropdown list, other fields then get filled in using the pulldata function. The user then completes the survey and submits it.

Our users have asked if there is a way we could modify the app to indicate the wells that have already been surveyed so that they can know which ones they still need to do. The simplest approach would be to just indicate this in the dropdown list:

W-01
W-02 (done)
W-03
W-04 (done)

And then when they submit a survey for another well, say W-01, the dropdown list would be updated after they submit so that the next time someone take a survey the list would be updated to this:

W-01 (done)
W-02 (done)
W-03
W-04 (done)

I know something like this can be done using a webhook and/or Power Automate, but before we go down that route we wanted to see if there might be a way to accomplish this using the functions built into Survey123 Connect or javascript.

So my question is, does anyone have a suggestion for an approach to accomplishing this that doesn't require Power Automate?

0 Kudos
2 Replies
abureaux
MVP Frequent Contributor

To keep it simple, you could have each well be its own record in the database. Then, just use the Inbox. That will do exactly what you are looking for, either through WHERE queries, or conditional formatting.

Is that a possibility?

0 Kudos
TomFlahive1
Emerging Contributor

I'm having a hard time picturing the workflow you are suggesting.  Would you be able to explain that in a little more detail? Currently we are not using the Inbox.

One approach we did considered was using a search function to pull back a list of the 35 wells, and then using a second search function on the survey table to pull back a list of wells already surveyed.  Then once we have these two lists, we would use JavaScript to generate a new list showing the wells with their survey status, as shown above. But I don't think this will work for two reasons. First, although the search function can be used to fill a select_one dropdown list, it doesn't look like you can use it to just pull back a list and save it to a variable to be used elsewhere. And second, the only custom JavaScript examples I have seen for Survey123 are on the pulldata function. I haven't seen JavaScript used with the search function.

0 Kudos