Hi!
I am creating a signup systems for events using CCK Signup (Normal Signup wouldn't work because I need to access the data in the signup nodes in views so I can export them to XLS and wan't to do some other things with the signups data)
I wan't to improve cck signup now. Because it avoids making additional singup nodes after a certain number of signups have been reached. But it does that by just showing a message after I alread tried to signup to an event. But I need the event to disapear when it has reached its capacity.
So I created a rule that is triggered when a new signup node is created.
I have an interger field in the event node which holds the number of signups are allowed for this event. An used the action load referenced node.
My question is now: How will I get the number of SignUp nodes already pointing to the event node. And how can I compare them with the integer number stored in the capacity field of the event node. If the number of SignUp is equal or bigger than the capacity I want to unpublish the event node.
Regards
Marcus

Comments
PHP?
I'm trying to do the same thing, except that I won't unpublish the event node, I'll just display a "closed" status and hide the signup link. I'm not using CCK Signups, just CCK, because I couldn't see that CCK Signups actually does anything useful.
What I am trying to do is set up a rule so that when a signup node is created, the "reservations" value in the event node is incremented. I have Tokens installed, so I created a PHP rule like this:
[referenced_node2:field_appt_reservation-raw] = [referenced_node2:field_appt_reservation-raw] + 1;
This doesn't work. I'm not sure how to make it work. I understand PHP syntax, but not how to use it in this context.
If I can get the number of signups to update, then I'll use a second rule triggered by creation of a signup node, to run after the update rule, and this second rule will compare "reservations" to "capacity," and if reservations>=capacity, I'll change the event node status value from Open to Closed. I think that rule should be fairly easy to implement.
If I get this part of the ruleset working, I'll also add rules to send an email notification to the user on signup, and a reminder a day before the event based on cron. I'll also need a way to decrement the reservations count if a signup is deleted.
Other options I'm considering are CCK Dynamic Field to calculate the number of signups referring to the event, though I'm not sure this would be correctly updated if the event node is loaded in a Rule, or Viewfield, with a view that only returns the number of matching signups for that event. Again, I don't know if the Viewfield would be updated correctly on the node load in Rules.
I will post the results of my experiments here in case it will help the original poster and anyone else trying to do something similar. I would welcome suggestions from anyone who understands how to do this with PHP.