Instead of applying a filter to a drop-down field ‘Approved_by’, can we make the field ‘Approved_by’ hidden (only on Edit) and save it to the table with the CurrentUserID just IF that user changes the other field Approval to Approved?
Both field are in the same table.
EX.
Only while editing, NOT on Add.
Field: Approval - Logged in user changes this field to Approved (value 2)
Hidden Field: Approved_by - Takes the value of the CurrentUserID() and saves it to table
can we make the field ‘Approved_by’ hidden (only on Edit) and save it to the table
with the CurrentUserID just IF that user changes the other field Approval to Approved?
Yes you can. You may hide the field by using “Page_Load” server event, and then use “Row_Updating” server event to assign that field, for example:
In Page_Load:
$this->Approved_by->Visible = FALSE;
In Row_Updating:
$rsnew[“Approved_by”] = CurrentUserID();