Skip to main content
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor III
Partner - Contributor III

Sense API: Loop over values in a field and perform action


With my Javascript extension, I want to loop over a field (i.e. select each value in a field one by one) and then perform an after selecting a value. So, select a value, perform an action, and after finishing this action, the next value should be selected.

I can select a value using the select method of the Field API. However, I don't know how to get all (possible) values of a field.

So my question: how can I do this? I can imagine I need to fetch the possible values? Or is another method recommended for this problem?


Labels (1)
  • API

2 Replies
Partner - Contributor III
Partner - Contributor III

A bump to make this post a little bit more visible. Is someone able to help me out?

Partner - Contributor
Partner - Contributor

I also failed to call Capability api, I managed to call only QRS api. Example below: (node js)

var https = require('https');
var fs = require('fs');

var options = {
    hostname: '',
    port: 4242,
    path: '/qrs/app/full?xrfkey=0MwkYLXpxHrbkKGu',
    method: 'GET',
    headers: {
        'x-qlik-xrfkey' : '0MwkYLXpxHrbkKGu',
        'x-qlik-xrfkey' : '0MwkYLXpxHrbkKGu',
        'X-Qlik-User' : 'UserDirectory=internal; UserId=sa_repository'
    key: fs.readFileSync("C:\\Users\\...\\client_key.pem"),
    cert: fs.readFileSync("C:\\Users\\...\\client.pem"),
    ca: fs.readFileSync("C:\\Users\\...\\root.pem")
https.get(options, function(res) {
    var bmpString = "";
    res.on("data", function(data) {
        bmpString += data;
    res.on("close", function() {
}).on('error', function(e) {
    console.log("Got error: " + e.message);