For the 2019 Esri Southern African User Conference I challenged myself and looked for a solution to a requirement that one of our clients have.
In a nutshell the client wants a survey that follows a preset workflow, for this example we will create a solution for a workflow that involves inspections done at regular intervals when a house is being built.
Let's consider the following status values for a building inspection survey:
Here are some user requirements for this survey:
How will we go about forcing this workflow in Survey123?
There are some hidden challenges in getting this to work. The biggest hurdle is that in Survey123 you cannot compare a field to it's own or previous value, so you cannot tell Survey123 the next status can only be Foundation when the current status is Excavation. This has lots of design implications and one would be tempted to stop looking for a solution right here. But this is where you need to think a little bit out of the box...
So how does the end result work? Lets take a look:
In the above screenshot the following can be seen:
Lets look at the bits and pieces to make this work:
We need a way to only allow the inspector to choose one "next" status and this needs to be based on the "current" status. So we need a select_one that is filtered according to the "current" status:
Notice that we added a filter column called "prevval" to the choices for the "level" list. In this example "level" refers to the status of the inspection. Also you will notice that the levels run from 1 to 6 and the corresponding "prevval" filter is one level behind. So if the "prevval" or current status is zero (0) then the list will filter and only show Excavation as an option.
We do the max function so that for newly created records we start with a level of zero(0) - the pulldata returns nothing since there isnt a record created yet to query so we convert it to a 0 with the max function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.