if you look at the config change templates section of the admin guide, you will find a list of entities and properties you can reference in the script. vlanid is of the properties for an interface object. In the script body above, you can reference this as
@portItem.InterfaceDescription
your script body will also expect only 2 parameters - NCM.Nodes and NCM.Interfaces