I have a condition where a field named Group should not be editable when I have a value in a boolean filed as True
Regards,
C4u
I have a condition where a field named Group should not be editable when I have a value in a boolean filed as True
Regards,
C4u
From the edit method only, I have to control where the sequence number can be edited or not. Since the field is virtual string field, I cant able to override active or modified from its group control in form
In this image, consider this as a QO and I have a condition here, I have to the make the sequence number field as not editable when I have a tick mark in the field of test result and it should be editable when the test result has the value cross.
I don't think allow edit can be controlled from within that method. Is there any reason you want to use method of virtual string (unbound control) for allow edit.
But in the code that you have given involves usage of separate methods like active, modified. I am asking for a way to use the existing method associated with the virtual string
I think still the code shared above is applicable for unbound string control (Group field). Please try it.
The field I have mentioned is a string field that has been created virtually in a form and it's been linked to a data method. Now, I have to change this one, based on a check box condition without any other method. Is there anyway I can use the method that is linked to the virtual field ?
Hi, You need to set Auto Declaration property to Yes on 'Group' control and override Modified method of this control in form design.
public boolean modified() { boolean ret; ret = super(); GroupField.allowEdit(!this.value()); return ret; }
Override active method of form datasource and add the below code.
public int active() { int ret; ret = super(); GroupField.allowEdit(!DataSourceName.BooleanField); return ret; }
The answer is there in the link posted by Komi. And there are hundreds of examples in the standard code by the way.
Hi C4u,
Please, can you show us the field you want to make uneditable and the boolean field(screenshots)
I didn't quite get that properly, if possible can you explain me with a piece of code ?
André Arnaud de Cal...
292,162
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156