Hi, I have an application that uses a couple of forms. One to hold details of the drive and one to hold details of the fault with that drive. Users open up the drive form and hit a button to report a fault. This runs the following code which changes the status of the drive (to offline) and composes a fault form based on the current drive document. Problem is that intermittently the fault form is created based on the wrong drive.
@Command( [EditDocument]; "1" );
@If(DriveStatusMech != "Removed"; @SetField("DriveStatusMech";"Offline");"");
@If(DriveStatusFinal != "Removed"; @SetField("DriveStatusFinal";"Offline"); "");
@Command( [EditDocument]; "0" );
It always seems to be the drive below the current one on the view that is used to generate the new form. My guess is that when the document gets saved it changes the order of the view temporarily and this affects the Compose command with inheritance of key fields. Has anyone seen this problem and can you offer me a solution.