Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Help with script

Avatar

Level 7

How with a script I can make a field to became READ ONLY?

I have DDList and I like when the value from DDL is e.g. 12 the Field A to force to read only.

Thank you

3 Replies

Avatar

Level 10

In the Exit event of the DDList

Language JavaScript

if (DDList.rawValue == "12")

     FieldA.access = "readOnly";

Thanks

Srini

Avatar

Level 10

You use .access to control those properties.

fieldName.access = "readOnly";

The other options are "protected" and "open".

Avatar

Level 10

In the exit event of the DDlist you woudl code something like this:

if (this.rawValue == "12"){

     FieldName.access = "readOnly"

} else {

     FieldName.access = "open"

}