Understanding Locks

A lock in ActivityInfo serves as a restriction that prevents users from adding or editing records in a specific resource such as a folder, form, subform or Database. They are employed to prevent conflicts and maintain consistency when multiple users are accessing or modifying the same data simultaneously. Locks play a crucial role in preserving the integrity of data versions after they have been validated within a Database.

Key Concepts

There are two types of locks in ActivityInfo: date range locks and rule-based locks.

A date range lock can be implemented on a form or subform featuring a date, month, or week field as a primary identifier called key fields in ActivityInfo. When users attempt to add or edit a record for a locked period, they encounter an error message and are unable to save the record. Locks can be applied at Database, Folder and Form levels. When a lock encompasses a Database or folder containing a form with a key field, the following happens;

  • When a date range lock is assigned at a form level :

  • Other forms within the Database without the date key fields will not be locked

  • Other forms within the Folder (assuming the form is part of a folder) without the date key fields will not be locked

On the other hand, a rule-based lock is specific to forms and subforms. It utilizes a formula to define a rule that determines whether a record should be locked. This type of lock allows for criteria beyond dates, such as region or response type, to be considered. The formula used must produce a Boolean result.

By using a rule-based lock, you can effectively control the editing and addition of records in your Database. This helps maintain data integrity and ensures that validated records remain unchanged.

It is important to note that if a record of a form is locked, the records of the form's subforms will also be locked. This ensures consistency and prevents any unauthorized modifications.

Locks also possess the property of being active or inactive, allowing for temporary suspension of a lock when necessary. For instance, If a reviewer identifies areas that require edits in the locked resources, they can temporarily suspend the lock by making it inactive in order to make the necessary edits.

Locks are universally applied to all users, irrespective of their role. If more granular permissions are required per role, this can be reflected in the in role design.


In humanitarian-based Information Management systems, locks can be useful in various scenarios to ensure data integrity and security. Here are some examples:

  • After data validation: Locks can be used to prevent any further changes to data once it has been validated by the relevant personnel. This ensures that the validated data remains intact and serves as a reliable source for analysis and decision-making.
  • Compliance monitoring: Locks can be applied to specific indicators or data fields to enforce compliance with standards or regulations. For instance, in a humanitarian project that involves the distribution of relief items, locks can be used to prevent unauthorized changes to the quantity or distribution records, ensuring accurate tracking and accountability.
  • Data freeze and archiving periods: In certain situations, it may be necessary to freeze data during critical phases of a humanitarian intervention. Locks can be employed to prevent any changes to the data during this period, avoiding potential disruptions caused by unauthorized alterations. Locks can be used to preserve historical data by preventing any modifications to archived records. This is particularly important for long-term monitoring and evaluation, as it ensures the availability of accurate and unaltered data for future reference and analysis.


Overall, locks provide an additional layer of security and control to support effective and reliable data management in humanitarian operations.

Next item