I am looking for a way to decrement a dynamic value (number of seats per faculty member). I am using a Join to match students to a faculty member, then grabbing the first match by Grouping the values into an array and grabbing the first element. Who the student matches to is dependent on the number of available seats, so we need to be able to decrement the number of seats per match (5 available seats - 2 matches = 3 available seats) but also move to the next match once the number of available seats is zero (5 available seats - 5 matches = 0 available seats, move to next matching faculty that has available seats > 0). The problem I am running into now is the available seats per faculty is getting decremented only by one, even if there are multiple matches for that faculty, and moving on to the next match in the list once the available seats equal zero. I have looked into decrementing using a Sequence snap, although it would not be dynamic as I can’t start the initial value as the number of open seats per faculty.
Thanks in advance!