Create dynamic survey from database

I want to create a dynamic form that is re-created weekly using data from a database. Ideally, the form can connect to Viewpoint Vista (Trimble) as a data source, but we can use a spreadsheet if that won't work.

The idea. We are a construction company. Every week we have different workers. We want to have the supervising managers rate workers performance, so we know whether to hire those workers again or not. This would be done by a form that would be sent to a manager to rank each employee individually on a scale of 1-5 in a few different topics (teamplayer, attitude, punctuality, etc). The workers are listed in the Viewpoint Vista database (and nowhere else). The form would need to be dynamically populated with all of the workers names, and have the different topics listed for each worker. Ideally, this is auto-generated and delivered to managers. The managers do not change, only the employees.

It's important that the results are able to be collected into another database (spreadsheet or otherwise), or some sort of ranking/sorting system, so we can see an average. Some workers will be rated repeatedly, so it would be helpful to see a count of how many ratings each worker/employee recieved in total when reviewing their rankings. As an example: If we hire Employee #1 for 10 weeks in a row, he is rated 10 different times. If he is rated a 5/5 for 8 of the 10 weeks in all topics/categories, but is rated 1/5 for 2 of the 10 weeks, he would have an average rating of 4/5 for all 10 ratings.

Can Retool do this? What is the best process to go about creating this?

I should add that there will be anywhere between 30-50 employees per manager, and preferably all of them are listed on the same form (rather than having 30-50 different forms).

Hi @tylero! Thank you for reaching out and we can definitely support this use case in Retool. Here is how you can get started:

  1. Create a resource in Retool to connect to your Viewpoint Vista API. Test the connection to ensure you're successfully retrieving worker data.
  2. In your Retool app, create a resource query to fetch the list of workers scheduled for the current week. You can filter by project, date, or any other criteria from your API.
  3. Use Retool UI components to configure the form.
  • You can use the list view component and connect it to your resource query data. This dynamically creates a section for each worker. You can also configure the container title to be each worker’s name ( for example you can set the value to {{ yourWorkerQuery.data.first_name[i] }} ).

  • You can also utilize components like number sliders or dropdown to configure the ranking questions.

  1. Add a submit button that writes the ratings back to your database using a bulk insert query.

I hope these steps are helpful for building out your use case on Retool!