Problems composing a new doc based on an existing one after I save it

Posted on 2006-04-06
Last Modified: 2013-12-18
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"); "");

FIELD saveoptions:="0";
@Command( [EditDocument]; "0" );

@Command([Compose];"";"Fault 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

Question by:andyhines
    LVL 18

    Accepted Solution

    Hi andyhines,
    The inheritance should be from the open document, or on the one where the button is pushed.  If I have two open documents, A & B, and push the button on B, then the inheritance will be from B.  That is if your action button is on the form, and not the view.

    Works fine with two, three documents open, saved, unsaved.

    The fields on the copy doc are set to the field values i.e. fieldone formula = fieldone

    Tested 6.5.3, Windows XP.

    This may be one of those times when you have to hover over the users and see what they're doing... ;)

    LVL 63

    Assisted Solution

    In a worse case scenario, you can use a button to create a new doc and copy the fields  that you want over manually.
    Using LOtus Script gives you a little more control.

    If you want , I can post what I use.

     I hope this helps !

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now