Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Not applicable

Make selections in extensions

I am using app.field(fieldName).selectValues to set the filters in extension. It sets the filters when app loads. But filters are not permanent. User can remove these selections.

1. Do we have any event that I can catch and repaint the layout so that I get the same values selected?

2. Other values apart from the selected ones are also available for selection. How can I grey out/disable them so that user can not select these values apart from the ones which are set selected initially.

3 Replies

Re: Make selections in extensions

1. For every selection in the application that will trigger a repaint of any objects and your extension.

2. I would recommend that you do not lock this down as it could have some severe implications to how QS works.
Now what I would recommend is that you can lock selections. Locked fields will still be locked after a Clear Selections event or other selections in other fields.
The user will still be able to un-lock any locked fields BUT if they do so most likely it will be for a good reason

See https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/BuildingWebsi... for more information on how to lock a field.

Not applicable

Re: Make selections in extensions

Thanks Alexander.

1. This is what I thought, but this is not repainting. May be there is some issue with calling the selectValues() method, though i did not notice any in debug window. Any clue?

2. I do not want to lock the selected values. I want the values other than the selected ones should be disabled or unavailable for selection. So if there are two items selected, then user should be able to select any of these two only. Selecting any other option should not change data.


Re: Make selections in extensions

Hmm, there won't be a good way of achieving that. The only way would be to lock selections.

It sounds like you want to create a drill-path which must start at the top? Qlik by nature is not build like the old traditional olap cubes.

And you can't use set analysis to only include certain fields in your calculation?
Another option might be to use a different state, then your extension won't be affected by selections in the normal app.

Community Browser