My action button formula is no longer working in an application that has been in use for 1.75 years. Our Servers and Client were upgraded to R6.5.1 from R5.0.8 around October 2004 in November of 2004 My problem occured. My formula sets a value in a field (“A”) on a form and gets a value from the same form different field (“B”). The purpose of the first @setDocField, (“A”), is to prevent concurrent access to the second field (“B”) on the form untill the action button formula completes it’s processing.Prior to October 2004 this process worked, now it doesn’t. Here is a copy of the Action button formula.
@Command([EditDocument] ; “1” );
@Command([ViewRefreshFields]);
A1 := @GetDocField ( “DocUNID” ; “A” );
A2 := @If ( A1 = 1 ; @Prompt([Ok] ; “Number” ; “Please Wait Five Seconds and Try Again”) ; 0 );
@If ( A2 = 0 ; @SetDocField ( “DocUNID” ; “A” ; 1) ; @Return(“”) );
F1 := @GetDocField ( “DocUNID” ; “B” );
F2 := F1 + 1;
FIELD Number := F2 ;
@SetDocField ( “DocUNID” ; “B” ; F2 );
@SetDocField ( “DocUNID” ; “A” ; 0 ) ;
This action button fromula is used to prevent the number in “B” being given to another user preforming the same action button formula at the same time. Field “A” should lock the second user out untill the formula completes its update of the New “B” value.
I welcome any thoughts.