Appearance
Tutorial: an equipment checkout app
A store lends tools and equipment to staff and wants to see what's out and what's overdue. You'll build it in about 20 minutes.
1. The table
App Builder → Registered tables → New table.
Code
equipment_checkout, Label "Equipment checkout".Columns (Add column for each):
name type label itemstring Item borrowerstring Borrower checked_outdate Checked out due_backdate Due back returnedbool Returned notestext Notes Create table. Note its database name,
app_t<organization id>_equipment_checkout: you'll need it for the query.
2. The page
- App views → New view: Code
equipment(the page will be at/app/equipment), Title "Equipment checkout", Type "Page (visual builder)", Primary table "Equipment checkout". - Leave Publish to nav (creates menu item + grants tenant) ticked, and click Create view. The Page designer opens.
- Click Templates, set Bind data widgets to table to "Equipment checkout", and apply List + form (a grid on the left, a form on the right).
- Click Save page, then Preview.
Enter dates as YYYY-MM-DD.
3. A query for overdue items
Queries → New query: Title "Overdue equipment", Code
overdue_equipment, Type SQL SELECT, Connection "App tables (this organization)".SQL:
sqlSELECT item, borrower, due_back FROM app_t<organization id>_equipment_checkout WHERE returned = 0 AND due_back < CURRENT_DATE ORDER BY due_backTurn on Usable from app pages and Save. Run shows the result.
Back in the page designer, add a Data grid, and in Properties pick Named query "Overdue equipment". Save page.
4. Who sees it
The view's menu item is now in the organization's menu. In Modules & Access, tick the groups that should see "Equipment checkout" (see Modules and menus). They open it from the navigation, or at /app/equipment.
Who can save rows
As built, people with build access can add and change rows; everyone else who sees the page can read it. To let a group check equipment out, give the view row permissions (config.access) through the API or a package, and grant those permissions to the group.
Next
- Pin it to the dashboard: Customize → + Builder app, App code
equipment. - Add a workflow that emails a reminder through your mail service's HTTP API: reference.
- Read it from another system: Tenant API.