I would like my script to keep only one attribute designated by the user in a shape in which it will be renamed. I created the workspace below.

the attribute "ATTRIBUTE" persists in keeping the value 0 while the selected attribute contains 5, 12, 8, 45 ....
Where can my mistake be?
Thank you