I´m doing a course catalog app for sharepoint. And i have a list called Courses. in that list i have two columns called: seats and FreeSeats. When you make a new course the boss decide how many can apply to the course. So for ex: 5 seats. When the Fifth person apply there most be a stop. So i thought if i have the column FreeSeats, it can count up everytime someone apply. And when it is the same as the column Seats it will NOT be able to apply. So i guess i need some sort of count that add 1 everytime someone apply to the FreeSeat column. And in a if loop check if the value of freeSeats are smaller than Seats, you can apply. If its bigger than Seats it will come a stop message.
Someone have any idea how a code like this looks like? I have never done this before.