Glide multiple edit screens, same table
Introduction
This is my attempt at a guide to multiple edit screens in the same table. This topic fits better in “Community Resources”, but i cant post there yet. I’ll create a post there too when I can. I call this my “Edit switch”.
Updates
This method cost 2 updates per edit instead of the usual 1 updates per edit.
Guide
In my example, for simplicity, im gonna make two edit screen in the same table, but the method practically works for 10+ edit screens, theoretically 100+ edit screens.
Im my example my table is called TABLE1, containing the following columns:
COMPANY/Name
COMPANY/Address
COMPANY/Contact
TASK/Product
TASK/Assigned
TASK/Deadline
Step 1
Create two columns in TABLE1:
EDIT SWITCH/Number (text)
EDIT SWITCH/Label (If - Then - Else).
- If EDIT SWITCH/Number = 1, then “Edit Company”.
- If EDIT SWITCH/Number = 2, then “Edit Task”.
Step 2
Create 3 Actions:
- Edit switch - 1
- Edit switch - 2
- Edit switch - On send
Action Edit switch - 1:
Set column values - EDIT SWITCH/Number = 1
Show edit screen - This item.
Action Edit switch - 2:
Set column values - EDIT SWITCH/Number = 2
Show edit screen - This item.
Action Edit switch - On send:
If EDIT SWITCH/Number = 1 then Notification “Company edited”
If EDIT SWITCH/Number = 2 then Notification “Task edited”
Step 3
Create buttons:
Button 1 - Name: Edit Company. Action = Edit switch - 1
Button 2 - Name: Edit Task. Action = Edit switch - 2
Step 4
Press button 1 or 2, and setup the Edit screen.
Set screen “title” = SWITCH/Label
Set screen “on submit” = Edit switch - On send
Create two containers.
Container 1:
Visibility: show component when EDIT SWITCH/Number = 1
Add “text entry” COMPANY/Name
Add “text entry” COMPANY/Address
Add “text entry” COMPANY/Contact
Container 2:
Visibility: show component when EDIT SWITCH/Number = 2
Add “text entry” TASK/Product
Add “text entry” TASK/Assigned
Add “text entry” TASK/Deadline
End
You now have two different edit screens for TABLE1 depending on what button is pressed.