EpiTextBox value - how to set to null if fieldname.Text contains a value

e10
customization

(Karen Freeman) #1

In the MES screen, in End Activity, a check is required to ensure that a Quality-control field is not populated by an unauthorized operation. To do this, the field value is checked to ensure it’s null. I’m able to clear out the screen value but when viewing the record after the transaction, the unwanted value is saved.

The code snippet below shows the test to see if an operator entered a value into the field, and to clear it if they did. The edvEnd.dataView[edvEnd.Row] code is remarked out because it didn’t work to remove the value saved.

//Clear Rockwell entered by unauthorized operation
if (txtRockwell.Text != “”)
{
txtRockwell.Text = “”;
//edvEnd.dataView[edvEnd.Row].BeginEdit();
// edvEnd.dataView[edvEnd.Row][“MtlInspRockwell_c”] = “”;
//edvEnd.dataView[edvEnd.Row].EndEdit();
MessageBox.Show(“Rockwell entry cleared for Non-Inspect Operation.”);
}


(Bruce Ordway) #2

Do you need to do it in the End Activity form?
I was thinking it might be easier to use a BPM on the Labor.Update for your check/clear?


(Al) #3

as @bordway said, a BPM to do the check and stop the transaction with a warning message to clear the entered ttValue is the easy way -in my opinion as well-, thereby you do not need to null the field behind the UI screen, instead Epicor will state a reason message and asking Employee to clear the field to proceed, so people will be aware of what they are doing.


(Karen Freeman) #4

Hello,
I took your advice and now have the user clearing the erroneously entered field.
Thanks,
Karen