code-snippets icon indicating copy to clipboard operation
code-snippets copied to clipboard

Making the particular variable Read only in the RITM table

Open BeniRaja opened this issue 1 year ago • 0 comments

How to make the particular variable field as "Read Only" in RITM table on type as "onLoad" I have attached the code below,

function onLoad() { // Specify the variable name 'groups' var variableName = 'groups';

// Get the value of the 'groups' variable
var groupsValue = g_form.getValue(variableName);

// Check if the 'groups' variable exists and is not empty
if (g_form.hasField(variableName) && groupsValue !== '') {
    // Make the variable field read-only
    g_form.setReadOnly(variableName, true);
}

}

This is my code, but it doesn't works

BeniRaja avatar Apr 30 '24 11:04 BeniRaja