- Apr 23, 2022
- 146
- 90
If you're using plain text mode or a getter black, you can reference global variables. Leaders are stored in variables S.Madam, S.DJ, and so on, by slave IDs, and empty role is a null.Could someone help me? I'm trying to set up a rule with a complicated condition... Put simply:
If (person) is in (leader role), then rule always applies.
If (leader role) is empty, then rule always applies.
If (leader role) is not empty, then rule never applies.
I cannot figure out how to detect whether the role is empty or not. The only entity the rule condition seems to look at is the slave currently under consideration, and nobody else.
The condition you need is "!S.Madam || c.slave.assignment == Job.MADAM" (or whatever other leader role you need), though I think in block mode you can check the latter part with a special block instead.