Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Field won't be reset in FieldCanChange

$
0
0

Hello to all,

 

I have a problem and I didn't find a solution.

 

The following code in Workflow script doesn't do what I would expect:

 

Function Test_FieldCanChange(FieldName, NewValue)   'On Error Resume Next

Test_FieldCanChange = DefaultRes

 If ucase(FieldName) = "TS_DESCRIPTION" then     

           if msgbox ("Any change of the description field causes a loss of connection with the master req in the

                     master project. If you want to keep the link and cancel the change please click on ""Cancel""",1)  = 1 then   

                Test_FieldCanChange = DefaultRes     

           else     

                 Test_Fields.Field(FieldName).Value   = OldValueDescr        

                  Test_FieldCanChange = False        

            end if  

end if

  On Error GoTo 0

End Function

 

If I press cancel nothing happens and the cursor stays in field Desciption. The field contains still the new value and if I try to leave, the message occurs until I press OK. But in this case the new value will be written in the DB.

 

 I would expect, that if I press Cancel, the cursor changes to the field or test, depending where I changed the position (field or other test)

 

What do I wrong???? :-(

 

Regards

 

Kerstin


Viewing all articles
Browse latest Browse all 5491

Trending Articles