Form that had a select field populated by a field in 1 table that updates a field in another table

how do I get form fields to populate using values from a record in a retool table?

Welcome to the forum!
Have you gone through the tutorials?

1 Like

kind of. I can't even figure out which one I need.
I've read about 10 different articles here on form fields.
I've already setup tables with data.
I just can't figure out how to connect them with form fields

Can you explain what you want the form to be populated with? And share some screenshots?

I’ve got three tables:

  1. Properties - table of properties with characteristics in fields like address, bedrooms, baths, etc

  2. Pricebook - a table with about 50 records with a few fields
    rehab area (interior, exterior, kitchen, bath, etc)

  • rehab item (list of 50 different things that could be rehabbed)
  • unit of measure (things like each, LF, Sq Ft, etc)
  • Price for Materials
  • Price for Labor
  1. Assessments - currently it’s blank(no records), but has fields for:
  • address
  • rehab area
  • item to be rehabbed

I want to create a form whereby an assessor can pull it up on mobile, choose an address which would be a field populated by the addresses in the properties table.

The they enter n number of rows where each row would have 2 fields:

  • Rehab area (this is a select field where there are 10 or so options) - this input field would be populated with the options from the pricebook table
  • item to be rehabbed (this is a select field that has about 50 different options) - this input field would be populated with the options from the pricebook field, and filtered/cascaded by the rehab area (which would then limit the item options

The assessor could then create another row as he heads into another room and lists what needs done in that room.

The result of the form entry would be n number of rows added to the assessment table, which could then be rolled up by property through a query and joined with the proicebook table to create a list of items per property along with units, quantity, and total price.

Alternatively, I could create a single form with 50 or 60 rows in a table, and 3 columns for each row. The table would be all the items the assessor needs to inspect, and the 2 columns would be:

  • okay
  • rehab
  • replace

The result of that form would be a single row in a table with 50+ columns, each one with a mark for either okay, rehab, or replace.

I think the first way is more user friendly.
But open to other options and ideas to skin this cat.

1 Like

Have you added any components to the canvas?
Can you share any of the data?
Have you seen the templates?

yes, here is what I've done so far

I have a form field, for rehab item, as example, but it's a text field. I need that to be a select field and I need it to pull from items in the middle table in this screenshot

Use the name of the selectedRow in the second table,
for example:
{{nameofSecondTable.selectedRow.rehab_area_column_name}} as the default value for the Rehab area field in the form.

Though, what I would do is just make one form and have all of the data within the fields as needed to be selected or be selected depending on what is selected before them

For example
Properties fields
Selected dropdown for Property name will then trigger the next select field to be populated with options for Rehab area....and so on....

1 Like