Page 1 of 1

How to access a model variable in Javascript?

Posted: Sun Sep 28, 2014 8:36 am
by Alexis Revue

Hello,

http://devcenter.appery.io/documentat...

I've created a model "A" with a property "B" in model tab.
I've created a storage variable "C" with "A" type in storage tab.

How can I access (get & set) the B property of C variable in javascript?

I tried these lines but it doesn't work...
alert(Apperyio.storage.storageVariable.get("$['C']"));
alert(Apperyio.storage.storageVariable.get("$['C']['B']"));


How to access a model variable in Javascript?

Posted: Mon Sep 29, 2014 11:54 am
by Kateryna Grynko

Hi Alexis,

You can read a value of 'B' this way:
prevar valueB = Apperyio.storage.C.get("$['B']");/pre