Please can you help. I have a parent form that has a unique Refence number. The idea is to use this reference appended with another sequential number stored in the parent document.
"ActionID" is field on parent doc - editable number field
"Reference" is field on parent doc - computed text field
"Ac_ID" is field on open child doc - editable text field
The following formula runs when a Save & exit button is clicked -
Temp1 := @GetDocField ( $Ref; "ActionID" ) ;
Temp2 := @GetDocField ( $Ref; "Reference" ) ;
Temp3 := @TextToNumber(Temp1) + 1 ;
@If ( @IsNewDoc ; @Do ( @SetField ( "Ac_ID" ; ( Temp2 + "/" + Temp1 ) ) ;
@SetDocField ( $Ref ; "ActionID" ; @TextToNumber ( Temp3 ) ) ;
@Command ( [FileSave] ) ;
@Command ( [FileCloseWindow] ) ) ;
@Do ( @Command ( [FileSave] ) ;
@Command ( [FileCloseWindow] ) ) )
Can you suggest any reasons why this won't work, and what I need to do to make it work?
"ActionID" is field on parent doc - editable number field
"Reference" is field on parent doc - computed text field
"Ac_ID" is field on open child doc - editable text field
The following formula runs when a Save & exit button is clicked -
Temp1 := @GetDocField ( $Ref; "ActionID" ) ;
Temp2 := @GetDocField ( $Ref; "Reference" ) ;
Temp3 := @TextToNumber(Temp1) + 1 ;
@If ( @IsNewDoc ; @Do ( @SetField ( "Ac_ID" ; ( Temp2 + "/" + Temp1 ) ) ;
@SetDocField ( $Ref ; "ActionID" ; @TextToNumber ( Temp3 ) ) ;
@Command ( [FileSave] ) ;
@Command ( [FileCloseWindow] ) ) ;
@Do ( @Command ( [FileSave] ) ;
@Command ( [FileCloseWindow] ) ) )
Can you suggest any reasons why this won't work, and what I need to do to make it work?