Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Disabled a field-in repeating instances

Avatar

Level 7

I have on exit event the script below for a mandatory field to became non mandatory in case there is a value.

My problem is that I have this field in a repeting subform and does not work for the second, third amd so on instances.

How I can make it work for all instances?  THANK YOU.

if (Department.rawValue != null)

{Department.mandatory = "disabled";

}

4 Replies

Avatar

Level 8

I don't understand why you're doing this.  If a field has a value then the mandatory requirement is fulfilled, why do you see the need to disable the attribute?  On the calc if you use this instead of the field name you likely would have more luck but again I don't understand why you're do this

Avatar

Level 7

This  I like to achieve is to remove the red border around the mandatory field.

It works for first instance but not for second, third and so on...

Thank you

Avatar

Level 8

Click the highlight existing field on the upper right, or use the this sytax for example this.mandatory or if you don't want to do that use the instance of the field otherwise you're referring to the original instance

Avatar

Level 7

with this.mandatory works fine.

Thank you for your help