AnsweredAssumed Answered

Create record in related table

Question asked by crichter on Jun 11, 2014
Latest reply on Jun 17, 2014 by crichter

Title

Create record in related table

Post

     Hello,

     I want to create  a new record in a related table only if the related record is not yet existing. I also want to "copy" the KnownPeptides::NP# field content of the current record to the newly created record.

     The script below I creates always new blank records in the related table even if there is a related record.

     Any help is highly appreciated.

     Thank you,

     Constance

      

     CreateNewRecordRelatedTable


     Set Variable [ $ParentID[KnownPeptides::NP#]; Value:KnownPeptides::NP# ]
     If [ GetField ( KnownPeptides::NP# ) = $ParentID ]
        Go to Related Record [ Show only related records; From table: “Transgenes”; Using layout: “Transgenes” (Transgenes) ]
     Else If [ GetField ( KnownPeptides::NP# ) ≠ $ParentID ]
        Go to Layout [ “Transgenes” (Transgenes) ]
        New Record/Request
        Set Field [ Transgenes::NP#; $ParentID ]
     End If

      

      

      

Screenshot_2014-06-11_22.35.19.png

Outcomes