Is anyone aware of any code to clear out a field when a status field is changed? Here is the scenario: We created a secondary status field that works with the primary status field, so when a primary status field is changed there are several secondary status fields to choose from. For example, your Primary Status field = Fixed and your secondary status options = Unit Test Complete, Pending Migration, Ready for Test...
So the problem is that once a user chooses a secondary field it does not clear out when the primary status is changed and the old secondary status is displayed until the user attempts to change the field and then the new corresponding options for that status are displayed. I would like to clear the secondary status field when a primary status field is changed and the user can either leave the secondary status field blank or choose a new secondary status field that corresponds to the primary status field. I used the script generator-list customization to link the secondary status lists to the primary statuses. Any suggestions will be greatly appreciated. [img]/images/graemlins/confused.gif[/img]
Re: How to clear out a field when a status is changed
In your workflow, you can trigger off of the FieldChange event and then set the secondarry field value to ""
<font class="small">Code:</font><hr /><pre>
On Error Resume Next
If (FieldName = "STATUS") Then
Bug_Fields.Field("<yourfieldnamehere>").Valu e = ""
On Error GoTo 0
give that a try and see if it gets you what you want