Hello Brains
I’m tyring to create an app for site service inspections of various mechanical equipment.
I currently have a ‘create new template’ page which has a title block to input information to get the report started. I will then have pop ups which load when equipment is chosen from a drop down menu.
For example, if the engineer is inspection a filter, they select that, give it a label (e.g. Filter 1) press ‘start checklist’ and Filter checklist pops up.
This has a specific list of questions with answers. currently the way I done this is that clicking a button sets the questions answer a state.
I’m having trouble coming up with the correct ‘cleanest’ workflow for the next part.
-
When this check list has been filled in - button ‘submit checklist’ adds this to a list of equipment in the main page, pop up closes.
-
The engineer can then select another piece of equipment - this might be a second filter the same as before, or could be a fan or valve etc. when that is complete it should also be added to the same list.
-
each part of the list should remain editable by clicking a button next to the item
-
Once the engineer has tested all equipment a ‘complete report’ button should then compile each checklist into a full report which can be made into a PDF and sent to customer.
hopefully someone can help!
Jim
I think we should take a step back and take a look at the data structure first. How are you organizing the database?
That’s sort of where I need help too. I’ve tried it a few different ways but currently:
Report: customer name, engineer name, date.
Customer: name, address, contact
Cyclofilter: various fields to collect answers for check list
Fan: various questions to collect answers from check list
The data structure is the key thing to nail here. I’d suggest something like:
- Report (customer, engineer, date, list of Equipment Checks)
- Equipment Check (label, equipment type as option set, answers as a list or individual fields, parent Report)
Each time an engineer submits a checklist, you create a new Equipment Check thing and add it to the Report’s list. That way one Report can have multiple filters, fans, valves, etc. — all as separate Equipment Check entries.
The tricky part is the “answers” per checklist since each equipment type has different questions. A few options:
- Store answers as a list of a generic Answer type (question text + answer value)
- Create separate data types per equipment (Cyclofilter Check, Fan Check, etc.) and use a field on Equipment Check to point to the relevant one
Option 2 is messier but easier to build initially. Option 1 scales better.
Are the questions unique to the type of equipment? In other words can some questions be used by more than one equipment check?
Also, who is creating the questions? the platform (you) or the end users?
The questions are set by me based on standard equipment servicing, the checklists will be filled out on site by my engineers. At the customer there could be 1 filter and 3 fans, or there could be 2 filters, 6 fans, 3 conveyors - so the report need to be able to be built on site by adding standard checklists for each item
To assist understanding its like we are doing checks for damage on a fleet of 3 cars. Each will have different areas of damage, but all cars damage is stated in 1 report for the customer:
REPORT:
- Customer Name
- Address
- Contact
- Engineer
CHECK LISTS:
Car Reg Number: (1A)
Car Type: (Input)
Exterior Checklist:
- check for dints/scratches - Good : Fair : Poor
- check doors open/close - Good : Fail : Poor
- state number of doors - 5
Comments/Recommendations: (Input)
Photos: (Upload)
[ADD TO REPORT]
Car Reg Number: (2B)
Car Type: (Input)
Wheels Checklist
- Tyre Pressure OK - Yes : No
- Tyre Wear OK - Good : Fair : Poor
Engine Checklist:
- Oil Level is good - Yes : No
- Air Filter condition - Good : Fair : Poor
- Smooth Running - Good : Fair : Poor
Comments/Recommendations: (Input)
Photos: (Upload)
[ADD TO REPORT]
Car Reg Number: (3C)
Car Type: (Input)
Exterior Checklist:
- check for dints/scratches - Good : Fair : Poor
- check doors open/close - Good : Fail : Poor
- state number of doors - 5
Engine Checklist:
- Oil Level is good - Yes : No
- Air Filter condition - Good : Fair : Poor
- Smooth Running - Good : Fair : Poor
Comments/Recommendations: (Input)
Photos: (Upload)
[ADD TO REPORT]
[Complete Report] = Saves everything to one report to send to the customer
hope that makes sense
Does this mean the Equipment Check would need to have a field for every possible question to save the questions as an Equipment Check - which then becomes a list of answers in Report?
No. The Equipment Check itself doesn’t need a field for every possible question. Instead, you’d have a separate Answer data type with something like:
- Question text (or a link to a Question thing)
- Answer value (text, or you could have separate fields for text/number/yes-no depending on flexibility needed)
- Parent Equipment Check
Thanks for the advice I’ll try this - i’ve changed the way i’m showing the questions to use a repeating group instead. so i can save a list of answers (playing with how to do that now) - what do you mean by ‘Parent Equipment Check’