How do I create a form that lists all entries in a different table?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have 3 tables:

  1. products
  2. requirements
  3. scores

I want to create a form that allows users to score products on all the requirements in the requirements table. The form should list all the requirements with a score box. How do I auto-populate the form with all the requirements from the other table? 

Photo of John S

John S

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of QB_Support_Brian

QB_Support_Brian

  • 20 Points
Hi John,



Can you give us a bit of background on this setup? It sounds like you have a series of requirements which are used over and over for different products, but what does the scoring process look like? I think there might be a workflow issue here, and once the workflow is well defined what the form looks like might be pretty straightforward



Thanks,

Brian.
Photo of John S

John S

  • 0 Points
Hi [mention://726 @QB_Support_Brian] ,

Thanks for coming to my aid!

This quickbase is being developed to evaluate a product's compliance to many predefined requirements. All the requirements that apply to every product are in a "Requirements" table. Products will be evaluated by giving them a "Score" for each "Requirement". So I'm thinking I have the following relationships:
* Many scores are associated with each product.
* Many scores are associated with each requirement.

I think the "Scores" table will have one entry for every product and requirement combination. So, the "Scores" table will have foreign key references to both the "Requirements" and "Products" tables. In addition, the "Scores" table has a single field for the actual "score" -- an integer value from 0-5. So, if there are 20 requirements, there will be 20 entries in the scores table for each product.

I want to create a single form for evaluating products. This form should list each requirement and provide a field for entering a score for each requirement. The form represents all the entries that will be placed into the "Scores" table.

Does that help? Basically, I can't figure out how to list all those requirements on a form with a integer input next to them.

I have decent knowledge of db design...and absolutely NO knowledge of QuickBase. Maybe you have a recommendation for a book? Tutorial? If I can save time doing this in QB, I'll be thrilled. If not, I'll have to create a custom application, plan for hosting, security, etc.

Thank you very much!
Photo of QB_Support_Brian

QB_Support_Brian

  • 20 Points
I think your plan for which tables, relationships, and fields to use for this is good. That is how I would have set it up as well. To make it easier to score products you can edit the form element which displays the scores on your product form, checking the 'editable' box. This will allow you to add new scores and update existing ones for the product, all on one page.

If each product needs to be scored for all requirements in your app, I would recommend creating a template product record, and create 1 details score record so every requirement is listed. Then you can go to Home > Settings > App management > Copy master and details records, and create a button to import the scores. To do so you would say "Always import detail records from a specific Product", and then select your template in the pop-up.

With that, your workflow would be - add a new product, save the record, and then press your import button to load the lines to score each requirement. It may be possible to update the import button QuickBase generates by chaining the JavaScript function into another URL, linking to the edit form for that record. You can build that URL dynamically this way;

URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#]

The piece I've not tried before is connecting the URL somehow to the import JS funciton, but perhaps others here have done something similar.

- Brian
Photo of John S

John S

  • 0 Points
Sounds more complicated than it probably is. Thanks for the tips.