Set one field to a null value if the value of another field is modified
For existing defects, I am trying to clear out the value currently selected for a field if the value of another field is modified. Below is an example of the code that I am trying to use:
if Bug_Fields(fldRegion).IsModified then
Bug_Fields(fldFacility).value = ""
The code works, but perhaps too well, lol. When the value of the region field is modified it does in fact clear out the contents of the facility field. However what happens is that if I attempt to select a new facility the code is still forcing the field to be blank and will not let me make a new selection. The whole idea was to clear out the facility field if the region field value changes so that the user would be forced to update their facility entry accordingly. It is not currently working as I would hope.
I have not done this for a while. I remember that there were different areas where the workflow code can go. Maybe it needs to be in "on change" do this. The code would trigger depending on which container it is placed in.