Forum

Vitali Kurdasov
Moderator
    Has successfully completed the online course Intermediate (200)
    Has successfully completed the online course Basics (100)
    Has successfully completed the online course Advanced (310)
    Has successfully completed the Intermediate Certification
1 month, 3 weeks ago #64347
Up
0
Down
::

Hi Gergey Matl,

you can set a whole struct as a globals variable by using this.getGlobals().setVar(‘VarName’,obj);

If you want to change just one property i would suggest you to use the setProperty Method:

sap.ui.getCore().getModel(‘variableHolder’).setProperty(‘/VarName/PropertyName’, value);

Of course you can use getProperty() aswell to read the Variable afterwards.