Many thanks for help with the script, i have tested it and i got it to work as intended and it is triggered as planed but $5 does not return anything so it fails.
If i change $5 to 1 manually as it is the iface i test on it works and the custom attribute is shown in the alert message.
If i change $5 to 1 manually as it is the iface i test on it works and the custom attribute is shown in the alert message.