Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Button click to change from Calculated Read Only to Calculated User Can Override

Avatar

Level 2

I want to change a bunch of checkboxes from Calculated Read Only to Calculated User Can Override via JavaScript button click.

Would greatly appreciate input!

3 Replies

Avatar

Level 2

If CheckBox1 is set to "Read Only" or "Protected" I am able to unlock it with this click event in Button1:

oTargetField = this.resolveNode("CheckBox1");

     oTargetField.access = "open";

But, unfortunately, I need to change it to Calculated - User Can Override.

I tried this to no avail:

oTargetField = this.resolveNode("CheckBox1");

     oTargetField.calculate.override = "warning";

Avatar

Level 10

It seems like if the field has already had a user entered value then setting the calculate override warning doesn't have any effect.  If you execute your code before the user enters a value then it seems to work.

If you wrap the checkbox in a subform with a repeat and an min occurrence of zero and initial occurrence of one, you could remove the checkbox, then re-add it and then set the calculate override warning.

Avatar

Level 2

I have figured out that I really don't require the checkbox to be Calculated - User Can Override status. Now I've added an app.alert on the Click Event that displays my required message.

Thank you for the response.