I am still struggling with the Engine API. I tried to create an extension using qSocks that changes the reference field in a master dimension upon user request. As far as I know, I could use two methods to achieve this:
In the case of applyPatches, the code is running fine but the changes are not reflected in the Qlik Sense application (neither in the desktop or server version). If I check the change via Dimension.getProperties, I see that the change indeed happened. The major difference with the applyPatches function of a generic object is the absence of a boolean to indicate that it concerns a soft patch or not.
In the case of setProperties, the changes are reflected in the Qlik Sense application. When the app is saved by the user on Desktop or refreshed/closed on the server, the master dimensions are however destroyed. They are simply gone and in the objects, the master dimension is directly replaced by the corresponding field of the data model .
Can any of you can help me to understand these phenomena and to come to a stable solution?
Thanks in advance,
Thanks for your reply, but I am using DoSave after each change, both on desktop and on server. So that should not be the problem.
I don't need to do any refresh to make the changes in the master dimension visible, right? I am doing a similar thing to change the titel of objects and there, applyPatches is reflected immediately in the app.
Any other ideas?
I noticed that the changes made to master dimensions are only reflected in the dashboard if I call the applyPatches method on the sheet objects afterwards. Calling applyPatches on the sheet objects seems to trigger a refresh of the objects, thereby refreshing the master dimensions as well.
The only remaining problem is for master measures: in the list of master measures, the new names are not shown. When I however click to edit a measure, the pop-up window shows the updated name in the name text box. For master dimensions, this behavior is not present and the new names appear immediately.
Anyone any experience with this? Does anyone have a solution?
Hi Gregory! Did you found solution to the problem? I am also trying to apply patches on master dimensions/measures and it needs to call applypatch on the sheet objects to get refreshed view.
I didn't manage to resolve the actual cause, but I've implemented a workaround by using promises. I first perform the changes on the master dimensions and measures. Once finished, I trigger the sheet object changes. Everything is reflected as it should be.