Create a new row but use another sheet's data as presets

Hello!

I feel like I’m not getting anywhere with this, so I’m wondering if the following is even possible with Glide…

My Glide app inserts events as rows in a Google Sheet. Some of the events have recurring elements such as time slots, names, hosts, etc. … so I have a second worksheet in this Google Sheet that contains event presets (each row is an event preset with event name, time slot and event text).

I want users to be able to use the presets from the second worksheet to add events (rows) to the main sheet.

Somehow I couldn’t figure out how this could be possible. To clarify things: Users can use the standard “ADD” button to add events to the sheet, but what I need in addition is the option to “ADD FROM PRESET”, where the new row in the event sheet is already partially filled with data from the corresponding preset row.

So the presets are dependent on the type of event. Meaning different types of events can have different presets?

The presets are actually only 5 columns: Show name, Show time, Show logo, Show text, Show host

Ideally the user would pick a Show name and then be able to use the corresponding presets in another sheet (main sheet)

I think what you need to do is first show a collection of Events (not in a form) from the Presets table. The change the action on that collection to Show Form Screen. So when a user selects a particular event form that Presets collection, it will show a form screen where you can then either add entry components with default values set, or pass the values through the form as Column Value components without the need to show those preset values to the user. They will just be automatically set when the form is submitted.

1 Like

Yes, I tried that. Problem is: when I load show names to choose from (from the Presets table), I cannot push the chose values to the Main table

Can you show how the form is configured? Are you using Column Value components or setting Default values on entry components?

Bildschirm­foto 2024-01-08 um 19.50.17
Bildschirm­foto 2024-01-08 um 19.50.28

The presets are here:
Bildschirm­foto 2024-01-08 um 19.52.00

Hard to make out what going on with the zoomed in screenshots.

Is your Shows list inside or outside of the form?
What exactly is your On Submit action doing? What I described should not be using On Submit, which can be quirky at times. It’s best to set the column value when the row is added. Not after it’s been added.

it seems I cannot add values from another table. only the one that’s chosen for the form. :man_shrugging:

So in my MAIN SHEET I can only use a choice element for example to choose A SINGLE VALUE from another sheet… but I need to have multiple columns in a new row in MAIN SHEET to be populated with data from SHOW PICKER

I think I would do it differently to what Jeff suggested. I don’t think there’s a right or wrong approach, the approaches are just different.

The basic idea: add a show as usual via the Show collection, use a choice component to write a Show Preset Row ID, and pull in show preset values via lookup columns.

I think I would set it up as follows:

In the Data Editor

  • A Shows table and a Show Presets table (you could see Show Presents as a choice table).
  • Show Presets table: Row ID, Show Preset name, Show Preset time, Show Preset logo, Show Preset text, Show host
  • Shows table: Row ID, Show Preset ID, relation column to Show Presets table, lookup columns to pull name, time, logo, text and host of the preset.

In the Layout Editor

  • A shows collection with the Shows table as the source.
  • A Show Form Screen action on that collection.
  • On the form screen, a choice component with the Show Presets table as the source.
  • The choice component would display the show preset names and write the Show Presets Row ID to the Show Preset ID column.

I think that would do it.

1 Like

It would probably help to have a better visual of your app flow. Column Value components in a form should always pull values from the parent row that opened the form, so if you have a collection from the preset table and the action I. that collection is to open the form, then the Column Value components that you can add to the form should contain all of the values from the selected preset row. Likewise, like I said, you can also use those same parent preset values to set the default values for entry components in the form. It’s still not clear to me how you currently have everything set up and what the app flow is currently like, but I think this should work.

4 Likes

that’s exactly what is not working for me: if I load a list with entries from the event preset sheet, it seems I can only write to that sheet. How would I manage to use column A of the preset sheet as values for the user to choose from - let’s say they choose row 7 - and then pull all the data from row seven (from all columns of that row) and use them IN ANOTHER sheet to populate a “new entry” form…that’s the problem, I hope I could make it clear :slight_smile:

" Shows table: Row ID, Show Preset ID, relation column to Show Presets table, lookup columns to pull name, time, logo, text and host of the preset."

what are lookup columns and relation columns? Is that soemthing I can add to the sheet?

  • Start with a Collection that uses your “Preset” table as the source
  • User Selects an item in the Collection. The default action will take them to the details screen for the selected row
  • Add a button to this screen with an Open Form Screen action. You should now have direct access to all values in all columns of the selected row to use as column values in your form.

I recommend the below video:

2 Likes

Ok, that works! Thanks! From a UX perspective it’s a bit annoying to not be able to use presets in the SHOW collection but instead have to go to another collectiopn, PRESETS, and work from there… but it’s better than nothing, thanks a lot!! :pray:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.