Public list associated with private booking (owner rows)

Greetings dear team,

Im Martin, using this amazing tool for 5 months now.
I have always found the work around here but today im stuck !

I have a public list of flights to book seats on.
Each time someone book a seat a private row is created in another related table « private booking table. (row owner principle).

However, i need to display live the number of remaining seats on the public screen.

I have a roll-up count function, to count the number of booking already made inside a relation column (rows in « private booking » table).

Unfortunately, for a given user, the rollup/count function counts only the rows associated with the corresponding row owner.
The other rows are ignored.
So the displayed remaining seats in the public screen is user specific… instead of displaying the right number.

Thanks in advance for your help !
Have a nice day

Yes, this is because Row Owners prevent those additional rows from being downloaded to the users device, so from any users perspective (other than the owner) those rows don’t exist.

What you would need to do here is maintain a global counter in your flights table, and then increase or decrease that as seats are booked or released.

Thank you for this fast answer.

Unfortunately i tried this too…
Yes i can increment.
But when a passenger delete one of his seats, the screen is then an « edit screen », he uses the « delete » red default button. And this delete button action is not editable in Glide. (Like a « submit » button is).
So i can’t associate a decrement to the deletion of a seat…

I also tried to use an intermediate table dedicated to the counting of seats, but this doesn’t inhibit the row owner protection.

Thanks anyway !!

Any other smart idea to solve this mastermind ? :slight_smile:

What you can do is dispense with the native delete function, and instead make your own.

So when viewing the seat details, add a standard button and then configure a custom action for it. Something like:

  • Increment Global Seat Counter
  • Delete Row
  • Show Notification
  • Go Back

You will probably need to create a Single Relation from your Seat table to back to your Flights table so that the increment can be done via that relation.

1 Like

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