Retrieve list of values of an attribute from mendix(local db) using dojo

0
Hi, How do we retrieve list of values of an attribute from mendix(local db) using dojo.  
asked
2 answers
2

First of all, I assume you mean a list of objects and the values of a specific attribute in those objects. One attribute does not contain multiple values.

If you mean objects this might be a way to achieve such a thing:

You would be able to do this by retrieving the list of objects with the mx.data.get action from the Mendix client API. When you provide the entity name you'd get all the objects giving you access to the attributes.

Check: https://apidocs.mendix.com/7/client/mx.data.html (scroll down to the get method)

example:

mx.data.get({
    xpath: "//System.User",
    callback: function(objs) {
        console.log("Received " + objs.length + " MxObjects");
        //iterate over the objs and get the attributes using the .get(attributeNameHere) method on MxObject
    }
});

 

answered
0

Why would you use dojo for retrieving values? Dojo is a toolkit.

See also http://dojotoolkit.org/reference-guide/1.10/

answered