Modify UDT parameter in a Script

I have a UDT for some AGVs with various parameters. The AGV locates to what we call ID Points which are in different stations through the line. I want to have a script get the ID point and from that ID point change the “Station” parameter. So I can use it later on an alarm to know which AGV on which Station is faulted.

I’m pretty new to scripting so I want to understand if this is possible. I don’t really want to do it in the expression of the alarm because it will be lentgthy and I think it can be shorter in a script.