andyhines
asked on
Problems composing a new doc based on an existing one after I save it
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("DriveStatusFina l";"Offlin e"); "");
@SetField("TesterStatus";" Offline");
@Command([FileSave]);
FIELD saveoptions:="0";
@Command( [EditDocument]; "0" );
@Command([Compose];"";"Fau lt Details")
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.
Thanks, Andy
@Command( [EditDocument]; "1" );
@If(DriveStatusMech != "Removed"; @SetField("DriveStatusMech
@If(DriveStatusFinal != "Removed"; @SetField("DriveStatusFina
@SetField("TesterStatus";"
@Command([FileSave]);
FIELD saveoptions:="0";
@Command( [EditDocument]; "0" );
@Command([Compose];"";"Fau
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.
Thanks, Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.