ECMS-5639 fix unknown problem when adding new script without fill the Name field

Problem to fix:
- Adding a script without fill the name field --> exception in the console

Solution:
- In the case name field is not filled then the value of script field will be taken.