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 every-time 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 every-time 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.