Hi!
Macros only works in string expansion for events, alarms, and actions. Strings withing scripts are just strings. If you want to set current node name as custom attribute, you can do it like following:
SetCustomAttribute($node, "Node_HostName", $node->name);
You can find interface object using FindInterfaceObject function, and then use SetCustomAttribute as usual to set custom attribute for interface.
Best regards,
Victor
Macros only works in string expansion for events, alarms, and actions. Strings withing scripts are just strings. If you want to set current node name as custom attribute, you can do it like following:
SetCustomAttribute($node, "Node_HostName", $node->name);
You can find interface object using FindInterfaceObject function, and then use SetCustomAttribute as usual to set custom attribute for interface.
Best regards,
Victor