FAQ
How can we help?
Full Site Search

How to Lock Entry When the Criteria Match?

This feature is still under development, and we plan to integrate it with Conditional Formatting feature. If you would like to get an update on this feature release, please contact us at support@ragic.com.

Before the feature is released, you can apply scripting as follows:

Example: If you want to lock a record in the "Sales Order" sheet when the "Status" field is set to "Complete" or "Cancelled", follow the steps below:

Step 1: Create a Conditional Check Field

Create a Free Text field, for example named "Entry Lock Check", and apply the following Conditional Formula to determine whether the record should be locked. If the condition is met, the field will return "Yes"; otherwise, it will return "No":

IF(OR(D3.RAW="Complete",D3.RAW="Cancelled"),"Yes","No")

Note: You may hide this field if necessary.

Step 2: Check the Field ID

Enter Form Page Design Mode, click the "Entry Lock Check" field, and find the Field ID next to the Field Name in the left sidebar (e.g., 1013368).

Step 3: Paste the Script Into the JavaScript Workflow

Right-click on the sheet name and select Javascript Workflow. Then, navigate to the Post-workflow.

Copy and paste the scripting:

var ENTRYLOCK_KEY = field ID;
var entry=param.getUpdatedEntry();
var entrylockValue = entry.getFieldValue(ENTRYLOCK_KEY);
if (entrylockValue == "Yes"){
entry.lock();
}

Please replace the Field ID with the ID you get in Step 2.

var ENTRYLOCK_KEY = 1013368;
var entry=param.getUpdatedEntry();
var entrylockValue = entry.getFieldValue(ENTRYLOCK_KEY);
if (entrylockValue == "Yes"){
entry.lock();
}

Once configured, when users manually update the "Status" field to "Complete" or "Cancelled", the system will lock the entry upon saving. Users can still unlock it for editing if needed.

Note:

1. This workflow will only be triggered by manual edits. Changes made through Action Buttons, formula recalculations, or edits from the Listing Page will not trigger the Post-workflow.

2. Record locks applied through this script will not appear in the edit history.

Share your feedback with Ragic

What would you like to tell us?(required, multi select)


Screenshots to help us better understand your feedback:

Thank you for your valuable feedback!

    Start Ragic for free

    Sign up with Google

    Terms of Service | Privacy Policy