How do I save values to Local Storage?
I present a finished app as an example, which involves multiple levels of pages and connections between different tables. One issue we encounter is setting the company connection when adding a new task, as we don't have a straightforward way to determine the company connected to the job. To solve this, I demonstrate how local storage can be utilized to store the company's record ID and retrieve it in the task form.
Additionally, I show how we can assign tasks to users using action links by saving the user ID to local storage. By clicking the action link, we can assign a task directly to a user based on the stored value.
Before diving into the builder, I explain the concept of connections, emphasizing that connections are always made using record IDs. The display value is chosen to identify the connected record, making it more meaningful to users. I also discuss the page structure, including parent and child pages, and how dynamic URLs are generated based on the record IDs.
Moving back to the builder, I showcase the tables and their relationships in our sample application. We have companies, jobs, and tasks, with tasks connecting to both jobs and companies. I caution against creating pages with excessive indentation and recommend not going more than one level deep.
To demonstrate the workflow, I add forms to the pages where users can add new records. I highlight the visible options when choosing a data source for the forms, explaining the limitations we face when selecting a connection from a previous page.
Overall, I aim to explain the concept of local storage and how it can be applied in a specific scenario involving connections between tables and pages in the builder.