Jarom.
A Relevant expression is a choice filter.
For your situation you have a form that presents elements that are filtered and "relevant" to the particular inspector.
You have 5 inspectors:
- Jarom
- Jim
- John
- Joe
- Jan
Jarom and Jim inspect plumbing, John does electrical inspection, Joe does termites and Jan checks wheelchair access.
On the choices tab, you would make an inspector list
list_name | name | label | category |
---|
inspectors | Jarom Hlebasko | Jarom | electrical |
inspectors | Jim Jarmusch | Jim | electrical |
inspectors | John Jacobjingleheimerschmitt | John | plumbing |
inspectors | Joe Mamma | Joe | pests |
inspectors | Jan Johnson | Jan | compliance |
On the Survey tab, for every element (or group) relevant to their inspection activity you make a formula that conditionally displays if it is true which simplifies the inspector's form to answer only questions he would observe but distribute one form.
I suggest bundling the questions relevant to them as one group (type=group, use begin_group & end_group to cluster them).
Using the structure below, the group of questions related to those inspectors name.
I only did two groups as an example, but you would have pests and compliance question groups too.
type | name | label | relevant |
---|
select_one inspectors | inspectors | Inspector Name | |
text favoritecolor | color | Favorite color today | |
| | | |
begin group | electrical | Electrical Inspection | selected(${inpectors},'Jarom Hlebasko') or selected(${inspectors},'Jim Jarmusch') |
integer plugs | plugcount | Number of Plugs | |
text hazardobs | hazard | Hazard Observation | |
image hazardpic | hazardphoto | Photo of Hazard | |
end group | | | |
| | | |
begin group | plumbing | Pluming Inspection | selected(${inpectors},'John Jacobjingleheimerschmitt') |
text pipe | pipetype | Pipe Material | |
decimal diameter | pipewidth | OD of Pipe in decimal inches | |
end group | | | |
I personally would simplify this by having a "select_one inspectiontype" list for picking a type of inspection instead of name>
This allows me flexibility if one of the inspectors may be qualified to do a number of inspection types and this would also help keep the formulas for "relevant" simple if I have 20 or 30 inspectors.
You can add this list in the choices tab like this
list_name | name | label |
---|
posneg | yes | Yes |
posneg | no | No |
Then make a select_one inspectedyesno option
type | name | label | relevant |
---|
select_one inspectedyesno | inspectstatus | Inspected? | |
You can then check off whether one element had been inspected.
Clear as mud?
Joe