How to remember an open transaction?

Let’s say that the User run’s a car rental service and uses our app for it. They input the license plate data of the car, choose the driver, and it gets stored in our data tables that that car is now rented out with the license plate and driver info. The User later gets a request for the same car, but they don’t remember that the car is rented out already. The idea is that once the User inputs the number plate, the app automatically tells them that the car is rented out and gives the User the option to cancel the rental. How do I make this happen? (This is a fringe example, just to give a better understanding.)

Would you be storing any dates at this point?
eg. Rental start and end dates?
If yes, then you would use those to determine if any given car was rented out at any given point in time.
If no, then you probably should :slight_smile:

Like I said that was just an example, the actual method is more of a transaction. They open the transaction for a number plate, then it kicks them back to main screen to enable them to add more number plates if there are more vehicles for the transaction. If they re-enter the same number plate, it should pop up saying “already open transaction, finalise and close transaction?”. Currenly we track the timestamp, plate number, and driver they select in a transactions table. The cars are linked in a seperate data table with their corresponding plate number. The question is more so how do we make it so in the layout it recognises that theres already a transaction open for that number plate?

I’m not entirely sure if this fits your flow and structure, but I think you can use a custom form, store the number plates, and use a query to the transactions table to see if there’s an open transaction for that number plate.