Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am building a MashUp and one of my main objectives is set a field (Fecha) to always one selected value. When I open the App in openApp.js, I include the following code:
openApp = app.obj.qlik.openApp(config.id, config); app.obj.app = openApp; console.log("app opened " + config.id + " in host " + config.host); app.obj.app.field('Fecha').selectValues(["Feb 2018"], false, true); var response = app.obj.app.global.session.rpc({ "method": "GetField", "handle": app.obj.app.model.handle, "params": ["Fecha"] }).then(function (response) { if(response.result && response.result.qReturn && response.result.qReturn.qType === "Field") { let qHandle = response.result.qReturn.qHandle; app.obj.app.global.session.rpc({ "handle": qHandle, "method": "SetNxProperties", "params": { "qProperties": { "qOneAndOnlyOne": "true" } } }) } });
Fecha is setting properly to "Feb 2018" but the OneAndOnlyOne property is not working properly.
Where am I wrong?