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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select & Lock selection in the script

Dear all,

I've developed a QV file with information based on the last 5 years and organised by region/market/...

I would like the year to be selected and locked when I reload the data.

Is there a simple way to have this integrated in the script. I tried the following but (of course) it didn't work.

ActiveDocument.Fields("PERIOD_ID").Select "2010";

ActiveDocument.Fields("PERIOD_ID").Lock;



Thanks for your help

10 Replies
Not applicable
Author

If I understand correctly, you have a macro that does a partial load.

You can Try this:

Sub PartialReload
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Fields("PERIOD_ID").Unlock
ActiveDocument.Fields("PERIOD_ID").Clear
ActiveDocument.PartialReload
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Fields("PERIOD_ID").Select "(2010|2009)"
ActiveDocument.Fields("PERIOD_ID").Lock
ActiveDocument.GetApplication.MsgBox("Partial Reload")
End Sub