Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to pass a field value using app.field and selectvalues method and it also appears in the selection pane. What I want to do is lock that selection or hide that selection so that no user can change the values of that particular dimension. Does anyone have any method or a way to solve this issue preferably using JS.
Hey @Aiham_Azmeh ,
Thanks for the solution. Had to make some amendments to it as 'await' did not work properly in the mashup. Here I am also pasting my code for further reference.
var app = qlik.openApp('app id');
app.field('field').selectValues([{qText: "value"}], false, false);
app.field('field').lock();
Let me know if this doesn't work properly for anyone.
Thanks.
Hi @garvit96 ,
You should be able to do:
const field = await app.field('your_field');
await field.selectValues(...);
await field.lock();
I hope this helps
Hey @Aiham_Azmeh ,
Thanks for the solution. Had to make some amendments to it as 'await' did not work properly in the mashup. Here I am also pasting my code for further reference.
var app = qlik.openApp('app id');
app.field('field').selectValues([{qText: "value"}], false, false);
app.field('field').lock();
Let me know if this doesn't work properly for anyone.
Thanks.