Change boolean on tap to true

Hello everyone,

I'm currently building a booking calendar and am facing an issue with updating a boolean value in my database.

Context:

  • Students should be able to book a session with doctors

  • I have an "docAvailability" collection in the database.

  • Inside this collection, there's a field named "isBooked" which is a boolean. When a doctor creates a new availability date, the boolean will be set to false automatically.

Problem: When a student selects a date and proceeds to book it, I want the "isBooked" field to update to true. However, I'm struggling to target and change this specific field's value.

Any guidance or suggestions on how to accomplish this would be greatly appreciated. Thank you in advance!

4 replies