Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jonvitale
Creator III
Creator III

Updating Properties in Measure via Engine API

I am using the Engine to update Master Measures via API. I am able to use the "ApplyPatches" method to successfully change the property of a master measure. For example, I have a master measure with the title "Loaded Measure". Using the following API call I can change that measure title to "New Title"

Capture.PNG

Here is a call to GetProperties method for that measure. It shows that the title has been successfully changed to "New Title".

Capture.PNG

However, when I go back to the app to see my update, I notice something strange. In the Master Measures panel the measure has its old title, "Loaded Measure". When I click on that measure and edit I see the new title, "New Title". I can click save and the title will be changed in the panel and anywhere else it is being displayed in the app. But the problem is that I am changing a whole bunch of master measures through the API. I don't want to have to go back through each one and click "save" to make them reflect API changes. There must be a way to make this happen through the API. In essence, in the following screenshot I would want to see "New Title" in all places as soon as ran the API functions.

Capture.PNG

1 Solution

Accepted Solutions
ErikWetterberg

And if you do a refresh? Doesn't everything get updated then?

Erik Wetterberg

View solution in original post

4 Replies
ErikWetterberg

And if you do a refresh? Doesn't everything get updated then?

Erik Wetterberg

jonvitale
Creator III
Creator III
Author

Yeah, you're right. I just needed to clear the cache too. Thanks

colinfly88
Partner - Contributor II
Partner - Contributor II

Hi there, could you provide more information on how to “refresh” via the engine? My changes are not persisting when I change dimensions or measures.
liuis
Contributor II
Contributor II

Here is noted, that ApplyPatches only affects current session.

I'm not sure if it is correct, but I also can see changes I made by ApplyPatches only inside current session.

But SetProperties method worked for me fine.