Forum

Vitali Kurdasov
Moderator
    7 months, 1 week 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.