Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Mashups API - Get Field Values

Hi,

I have a field in an application, Country... the docs suggest that I can get its values using the following code:

app.createList({

                qDef: {

                    qFieldDefs: 'Country'

                },

                qInitialDataFetch: [{ qTop: 0, qLeft: 0, qHeight: 100, qWidth: 1 }]

            }, function (r) {

                console.log(r);

});

However, this gives me the 2 fields in the app (Country and Population), rather than values for the country field, such as Germany, Sweden, Belgium etc...

I'm a bit confused - can anybody help me please?

Thanks,

shane.

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: Mashups API - Get Field Values

My silly mistake - I didn't have quotes around the parameters! (qDef, qInitialDataFetch)

app.createList({

"qDef": {

    "qFieldDefs": [

        "Country"

    ]

},

"qInitialDataFetch": [{

        qTop : 0,

        qLeft : 0,

        qHeight : 2000,

        qWidth : 1

    }]

}, function(reply) {

   

});

1 Reply
Not applicable

Re: Mashups API - Get Field Values

My silly mistake - I didn't have quotes around the parameters! (qDef, qInitialDataFetch)

app.createList({

"qDef": {

    "qFieldDefs": [

        "Country"

    ]

},

"qInitialDataFetch": [{

        qTop : 0,

        qLeft : 0,

        qHeight : 2000,

        qWidth : 1

    }]

}, function(reply) {

   

});