Making a data collection a clickable CRUD button

HI I am building a system for one of my clients that focuses on shuttle transport. I have run into an issue regarding the vehicle select portion and cant seem to find any workarounds. The following image shows the trip info portion of the application where they would have to choose a vehicle.

Is there a way to make that data grid collection clickable and update a table with the given vehicle type.

Any help in the matter would be appreciated :grin:

You should be able to use a Collection Item click action. Have you tried that?

I started with glide yesterday so I am pretty new to the actions. I added a new action and selected a Set Column Value Option. But I dont see the table in question on the action setup block

Okay, you’re on the right track.

If you need to set a column value in a different table, then you’ll need a single relation between the two tables. Could you show me screen shots of the two tables involved?

Ok so I set up a relation field and I now see the table in the option dropdown.

My next question would be is how do I set the value of the clicked vehicle into the “vehicle select Column”

I need a bit more context. Again, can you show me screenshots of both your vehicles table and the table where you need the value set please?

Sure, i can only embed on picture per post so you’ll get 2

Okay, I see. That helps.

So you’ll be wanting to do a Set Column Values through the “Trip Request Connect” relation.
But, you need to ensure that relation is matching the correct row in your first table. At the moment it looks like it isn’t matching any row.

This is where it starts getting a little bit complicated. Essentially what you are going to need is a Single Value column in your second (Vehicles) table that contains the RowID from your first table. And then you can use that to create a relation to the correct row. How you get that value there depends a bit on your overall flow. Can you tell me how the row in your first table is created? Is it created as the user enters this screen, or at some other point?

OK so a user clicks on a Book a Trip button in their dashboard and that opens a form page with fields that show on entry of the previous one.

And then once the Trip is created, do they tap an item in a list to enter the trip details screen and select a vehicle?


Okay, cool.

So here is what you need to do:

  • In your Trips table, create a Single Value column. This column should take “First → Whole Row” from your Vehicles table. Call this “svVehicles”
  • Next in your Vehicles table, create a User Specific Text column. Call this “Selected Trip”
  • Again in your Vehicles table, create a Single Value column. This one should take “First → Selected Trip” from the Vehicles table (ie. the previous column). Call this “svSelectedTrip”
  • Now, on the list of Trips (your last screen shot), you need a custom action with two steps:
    – Set Column Values → svVehicles → Selected Trip, setting that to the RowID of the selected trip
    – Show Details Screen → This item
  • Once again in your Vehicles table, modify your Trip Request Connect relation column so that it matches the svSelectedTrip column with the RowID column in your Trips table. Check to ensure this is a single relation.
  • If you’ve done all the above correctly, you should now be able to use a Set Column values on your Vehicles list that operates through the Trip Request Connect relation to set any column value in your Trips table
1 Like

Have to hit the road now, but will try this once i’m back at my computer in 30mins or so :handshake:

No problems. It should work as I’ve described, but feel free to reach out again if you get stuck with it.

Ok So i have done this. Would I now need to change the action on the vehicle type select to make this work?

Yes, that’s correct.

You should use a Set Column Values action through your Trip Request Connect relation. This should allow you to update a column in your Trips table with an appropriate value from your Vehicles table.

When I set It like this.

The grid is not clickable. I think I am doing something wrong

That suggests that your relation is not formed correctly. Can you show me a screen shot again of your Vehicles table, as well as the configuration of your relation column.