Select row from Master Table using drop down, copy row data to new User table without modifying Master

Apoloiges, this is presumably an easy task but I’ve tried numerous ways and would appreciate feedback.

There are 2 Glide data tables: ‘MASTER TABLE’ and ‘USER TABLE’. MASTER TABLE is populated with text and number columns and must not be edited. The USER TABLE is empty until the user adds data to it, which is data taken from the MASTER TABLE, that is then modified using calculations based on user specified number fields.

The app will have a drop down form, and three number form fields.

The dropdown form should allow a user to select a row from the ‘MASTER DATABASE’ data table.

There will be three separate number form fields below the dropdown menu, allowing the user to enter a number for “assessment period”, “duration” and “quantity”.

The user input into these three number fields will be used to undertake calculations and add the calculated values to the data taken from the MASTER DATABASE row.

Once the user has selected the name from the drop down and entered the numbers into the three number fields, they will press a button and a new row will be created in the User Database table. The Master Table must be read only, no changes are permitted to the data in this table.

The user can add multiple new rows to the new “User Table” data table using the method above. Once the user has finished adding new data, the app should allow the user to export the “User Table” in a preformatted csv file.

I have a spreadsheet that does this but would like to convert into a user friendly app. Any help would be appreciated.

Your explanation is really good! :+1:

You will want a form container to write to the Destination table.

By using the choice component, you will be able to select a value, a display text (optionally) and an image (optionally) from the master table and write to the wanted column in the destination table on submit.

By reading this, i think the best option would be to create a helper table for you form instead of a form container. That will give you more flexibility. Here is how to do it:

  1. Create an empty table with the name you want, e.g.: HT My Form.
  2. Create a single empty row.
  3. Create all the column (user-specifics) for the saved values: the three numbers and a text column for the choice input.
  4. Create query, relation, math,… columns dor your calculations and all your other needs.
  5. In the layout, add a new screen or a “show new screen” action as needed.
  6. Use the helper table as the source.
  7. Add a button linked to a new workflow that will have the logics for validating (Conditions), submitting (add row) and clear current row (set columns values - clear value on all fields of the helper table).
  8. When a user fill the form and click on the button, it will add a row in the destination table like with the values from the columns you chose in the workflow add row action.

The master will be read only in this case.

You can use the generate Csv action.

Feel free to ask for more details if you need :slight_smile:

Happy Gliding!

2 Likes

What are you going to use to store when user chooses “a row” in the other table? I assume a rowID?