Hi,
Is it possible to make a field in a table to editable or enable through coding. not setting in Properties.
Hi,
Is it possible to make a field in a table to editable or enable through coding. not setting in Properties.
Hi Seshadri,
Can you explain in more detail what you want to do?
There are workarounds depending on the issue.
The Editable property of the Table takes precedence over any Editable property of form control (text box). As Dave said, though, there are work arounds.
An example made in form 30, Item Card):
In a form (e.g. OnOpenForm) you may state CurrForm.Description.EDITABLE = (USERID <> ‘ABC’);. Here you say that USERID=ABC is not allowed to change field Description.
You find this function (and several others) here: F5, CurrForm-Controls-Description, CtrlRightArrow, Properties-EDITABLE.
The function only works on forms.
It sounds like you want the field only to be editable by certain users no matter which form they are on. Let me start by saying don’t hard code which users can edit the field. Add a setup parameter somewhere.
Now, you can add code to the OnValidate trigger of the table. If they are not allowed to edit the field throw an error (or message and reset the value to the previous value as this could cause the form to close). As far as actually making the field uneditable, as in they can’t click in it at all, you’d have to do that on every form.