problem to get system identity

Hello,

I cant seem to find out why I’m not getting the value of system identity when I execute this command, in turn I get a blank response:

/system identity get name
[EMPTY]

if I use system identity print, I get:
name: MyRouer

ROS version: 6.49.7

I just want to get the identity of the router on a variable to add it to a mail subject but it’s not working…
:set mikrotikName [/system identity get name]

Thank you in advance!
Regards
Ramiro

You can take the idea from here https://help.mikrotik.com/docs/display/ROS/Scripting+examples#Scriptingexamples-Generatebackupandsenditbye-mail

What you give with this command on terminal?

/system identity export

You have ALREADY defined the mikrotikName valiable with “:global mikrotikName” or “:local mikrotikName” ???

Show all the script, probably the error is on another place.