Skip to Content
Dec 29, 2016 at 02:34 PM

Save property from OData list into variable


I am trying to get a property from an OData list saved into a variable in javascript.

The model looks like this:

Eg. if I want to store the property Werks from list "0001", I can do it like this:


The problem is, this is a dynamic list. I don't know what the values in the parentheses are, but I know the order of the list. Should it not be possible to do something like this then:


This is not working, it returns "undefined".

How can I store the property "Werks" from the first element in the "ZcountWerks" list into a variable in JavaScript?


odata-kopi.jpg (40.6 kB)