That's right, you'll have to reference the container node for the variable you're calling if it's not within the same node.
But, other than that, you should check the syntax for that 'if' statement - having a look at the manual would also help a lot
-
Anyway, your statement should look like this:
ContainerNode.yPan==10?100:ContainerNode.yPan==20?200:300
Hope that helps.