Using :unique elements in an RG

Hi there,

Losing my mind here and I’m sure it’s a quick fix for someone out there.

I’ve got two databases. One is for online classes (dates, times, etc) the other is for bookings. They are linked in that the bookings database has Student of type User and online classes as type online classes.

In one RG a user can book, cancel and then potentially rebook a class.

In the user account RG I’m creating the RG links to bookings database and pulls class times etc through relations. The problem I’m having is that if someone books the same class twice then it appears twice on their list. This will be because they are separate bookings but for the same thing.

How can I filter this down?

I’ve tried a couple of things as in the images below but can’t get it figured out. I’ve tried all kinds of things in the constraints section but my formula skills aren’t quite there yet.

Any support greatly appreciated.

My attempt

The undesired result

Build logic to prevent the duplication when the class is booked

Thanks, that would do it but I was hoping to keep a record of all bookings for reporting.

I suppose if anyone booked for a second time though it could delete their first booking entry.

1 Like