I am trying to use an alert to populate a custom property which is fine if i want to either enter a specific text string. However, I want to use part of the node name. I have tried to use the substing SWL command to do this but i cant get it to work.
This is what i have entered

but this is the error im getting in the Custom Property field

${SQL: SELECTSUBSTRING ( test01-swta01.xxx.lcl ,1,6);}MACRO SQL ERROR - Invalid column name 'test01'.The multi-part identifier "swta01.xxx.lcl" could not be bound.
I have tried to create a drop down list so that test01 already exists, but the alert doesnt let you add a sql statement if the custom property is a drop down selection.
Can anyone advise what im doing wrong, if what im trying is even possible or some other solution to achieve this.
Thanks