Allowing Travelers to View Reservation (Visibility via Current User)

Hi everyone,

I’m building a app similar to Airbnb where I’d like to allow anyone who I add to a reservation as a Traveler to see the Reservation and any associated metadata.

I set this up to search for Reservations; where travelers (list of users) contains the current user. However, I’m getting an error.

Was wondering if anyone has recommednations on how to set this up or what I’m doing wrong here.

Thank you,

What’s the type of the Travellers field? It’s probably not User. Can you send a screenshot?

If Travellers is DEFINITELY a list of users, then maybe it’s an editor bug that’s showing the expression as invalid so clear cache and reload editor (annoying I know)

Also, as an aside, make sure you have privacy rules so that Reservation is visible only when This reservation’s Travellers contains Current User because I doubt you have that configured right now.

Good call on the privacy rules! Added screenshots below - I beleive I have this set up correctly but I don’t know how to make travelers a list of users otherwise.


Okay well your Travellers field is a list of Travellers, not a list of Users. You can’t add Current User to the List of Travellers because Current User is a User, not a Traveller.

Your DB structure will cause you problems though. Why are you saving Hotel Name and City to the Reservation? Why not save the Hotel type where you can then show the Hotel’s Name/City/Address etc…