Setting a row in a List/Library Control to read-only based on multiple values

USE CASE: Make a row in a List/Library Control read-only based on more than one condition. I would like to make the row read only if the “Testing Status” (Internal Name = “Status”) value = AAA or BBB or CCC

Hi @vhancock,

The == operator always returns a boolean result which is assigned to readonlyRow. This means that each next statement overwrites the result of the previous one.

You need to write a single statement that checks multiple conditions, like so:

fd.control('ListTestCaseScenario').readonlyRow = function(row) {
    return row.Status == 'AAA' || row.Status == 'BBB' || row.Status == 'CCC';
}

Here's more on logical operators in JavaScript.

Thanks, that worked. I was doing some crazy stuff that did not work, like row.Status == ("AAA" || "BBB" || "CCC"), etc.