Locking/Unlocking a Model
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Locking/Unlocking a Model

  • Dark
    Light
  • PDF

Article summary

How to Lock a Model?

  1. In SpotlightXL, access the Model >Setup page.
  2. Select a Generated model.
  3. Click the Lock Model action (which is only enabled when a Generated model is selected). Notice the Status of the model changes from Generated to Locked as shown below. Also notice that the Lock Model icon changes to Unlock Model.

newlockunlock.png

While locking a model ensures data integrity and prevents clearing the data, it also means that all data may not be saved/updated (see Saving Report Data to Locked Models and Saving View Data to Locked Models) from Views, Reports, Data Load, API Library, Calculation, and so on.

See: Saving Report Data to Locked Models and Saving View Data to Locked Models

Saving Report Data to Locked Models

If a report is associated with a locked model and the Enable Save property is set to All Models as shown below, users cannot save data from that report.

newallmodels.png

If a report is associated with multiple models, one of the models is locked, and Enable Save is set to All Models, users cannot save data from that report.

If a report is associated with a model that is locked, Enable Save is set to Calculation Model and Calculation on Save is based on the model that is locked as shown below, users cannot save data from that report.

repdesigncsave.png

If a report is associated with multiple models (some that are) locked, Enable Save is set to Calculation Model, and Calculation on Save is not based on the model that is locked, users can save data from that report to the models that are not locked.

Saving View Data to Locked Models

If Enable Save is set to Yes in a View on a model that is locked as shown below, users cannot save data from that view.

newsetupupdates.png

Functionality that can be used on Locked Models

  • Append
  • Set Display Label
  • Set Dimension-Based Properties
  • Attribute
  • Set Attribute Mapping

How to Unlock a Model?

  1. In SpotlightXL, navigate to the Model > Setup.
  2. Select a Locked model.
  3. Click the Unlock Model action.

Locking and Unlocking Models Using a Calculation

Another way to lock or unlock a model is to select the LockModel or UnlockModel type as a line item in a Calculation. Performing the lock or unlock in a calculation saves time as it automates the process. For example, you might want to unlock a locked model, generate a formula, run aggregation, and then lock the model once again. If this is the case, your Calculation might look like the following:

ModelingImagesimage261.png

How to Lock or Unlock a Model Using a Calculation?

  1. In SpotlightXL, navigate to the Model task and the Calculation subtask.
  2. Select the model you want to lock or unlock.
  3. In the Type list box select the LockModel or UnlockModel type as shown below.


Note:
When the Calculation runs, it checks whether the model is locked or not before executing each line item/step. If the model is locked, the calculation will be terminated and you will be notified.

Was this article helpful?