I have a little section of code on a combo value changed event. The messagebox uses the old value of ChkSideLapBothSides and not the value I just assigned above. It does take on the correct value once the code has completed. Any idea what is going on? Its like the input value change is put into a queue or something…
if (PCLookUp.DataLookup("MachineSpec", "WireSideTensioned", Inputs.ChrIndex.Value).ToLower() == "true")
{
Inputs.ChkSideLapBothSides.Value = false;
Inputs.RadSideLap.Value = "Urethane";
}
if (PCLookUp.DataLookup("MachineSpec", "WireEndTensioned", Inputs.ChrIndex.Value).ToLower() == "true")
{
Inputs.ChkSideLapBothSides.Value = true;
Inputs.RadSideLap.Value = "PVC Strip";
}
MessageBox.Show((Inputs.ChkSideLapBothSides.Value) ? "2 PVC Side Laps" : "1 PVC Side Lap");
What version of E10 are you on? I have seen this in older versions. For some reason the On-Field-Changed code only updated a temporary value, when it should be updating the final value.
I have had this problem before as well, and I couldn’t figure it out. In that case I was able to work around it by passing the calculated value as a parameter to the UDMethod in addition to setting the Input value, but I don’t think I can do that this time. I think it was a checkbox that time too, maybe I should check and see if it is only check boxes that behave this way…
I did not work in the validation event either. However, the value did take effect between when the validation finished and the On Value changed event begins. I think I can use this to do what I need, set the check box in the validation and use its value in the On Changed event.
Is this expected behavior or should I open a ticket?
I dont believe that you are (or should be) allowed to change any value in the On-Validation event… it is prohibited.
You need to submit a support ticket on this one if you are getting this behavior.
In case anyone is curious, I have narrowed the problem down a little. It appears that this only happens with check boxes that have read only conditions.
Here is an minimal configurator that demonstrates the problem, which I sent to Epicor. CaseExample.xml (23.7 KB)
someone was paying attention at Insights… I have actually used Combo-Boxes (with “Yes/No” or “True/False” instead of a checkbox… Why? Because I cannot tell if you selected a checkbox or not. you might have ignored it. but I CAN force you to answer a combo box.
Least Favorite: Radio Sets