docs/versioned_docs/version-2.43.0/getting-started/quickstart-guide.md
This tutorial will show you how to create an employee directory application in minutes using ToolJet. This app will let you track and update employee information with a beautiful user interface. Here are the step-by-step instructions:
1. Create Your First Application
6. Use Events to Trigger Queries
<div style={{paddingTop:'24px', paddingBottom:'24px'}}> <!-- </div> -->Once you have created your ToolJet account, follow the steps below.
<div class="video-container"> <iframe width="560" height="315" src="https://www.youtube.com/embed/LNvd7pZ72Yk?si=h0YzQeC6frmx6pcB&rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div>Optionally, you can also create a header by placing Text components over a Container component and styling them.
<div style={{textAlign: 'center'}}> </div> </div> <div style={{paddingTop:'24px', paddingBottom:'24px'}}>Now, create a new table in ToolJet’s Database to store employee records.
<div class="video-container"> <iframe width="560" height="315" src="https://www.youtube.com/embed/sxmXZesw2is?si=HARRc9ILmfLFGNZQ&rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div>firstname, lastname, email, phone, department, position, joining, and status.To display employees in the application, we first need to fetch data from the database using a query.
<div class="video-container"> <iframe width="560" height="315" src="https://www.youtube.com/embed/mnLw7avQsEg?si=5oxSo36V-D12316R&rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div>getEmployees.employees as the Table name, and List rows as the Operation.Run this query on application load? setting to automatically run the query when the app starts.Now, we need to bind the data returned by the getEmployees query with the Table created in the first step.
Data property, enter the below code:{{queries.getEmployees.data}}
Now the Table component is filled with the data returned by the getEmployees query.
In the bottom-right corner of the Table component, there is a + (Add new row) button that opens a form to add new data to the Table. Follow the steps below to create an addEmployee query and execute it when you click the Save button on the add new rows form.
employees as the Table name, and Create row as the Operation.addEmployee.{{components.table1.newRows[0].email}}
{{components.table1.newRows[0].firstname}}
...
Frame all the remaining keys in the same format.
</div> <div style={{paddingTop:'24px', paddingBottom:'24px'}}>The addEmployees query should run when you click on the Save button on the + (Add new row) form. And the Table component should reload and display updated data each time a new employee is added. Follow the below steps to use events to setup this functionality.
addEmployee query settings, Scroll down and click on New event handler.getEmployees as the Query.addEmployee as the Query.Now when you click the + (Add new row) button, enter the employee data, and click Save, the addEmployee query will execute, adding the data to the employees table in the ToolJet Database. This will be followed by the Table component reloading with the new data.
The preview, release and share buttons are at the top-right of the App-Builder.
<div style={{textAlign: 'center'}}> </div>Congratulations on completing the tutorial! You've successfully built an employee directory application and, in the process, learnt the fundamentals of ToolJet.
To learn more about how ToolJet works, explore the subjects covered in ToolJet Concepts.
</div>