2 Replies Latest reply on Apr 8, 2013 12:58 PM by krod

    Go to related record in a variable layout

    krod

      Title

      Go to related record in a variable layout

      Post

           I have created several different layouts to display different information from one table called Issues. Each entry in Issues has a specified "Issue Type" that is associated to a specific layout (i.e. "Customer Complaint" layout displays only entries with issue type "Customer Complaint"). Each entry in Issues also has a specified productID, which relates to parent table Products.

           I have a Products layout that displays the information from the Products table, and I have a portal that shows related information from the Issues table. I want to create a button in the portal that will open the related issue record in the appropriate layout based on Issue Type. 

           I started to set up a button in the portal with the following script:

           Go to Layout [If ( Issues::IssueType="Meetings" ; LayoutNames ( "Meetings" ) ; "Design Change" )]

           But this does nothing. I put in a superflous beep command just so I could make sure that the button connects to the script, and it does, but it won't open the specified layout, let alone the specified record.

           What am I doing wrong?

        • 1. Re: Go to related record in a variable layout
          philmodjunk

               You could use:

               Go to Layout [ Issues::IssueType ]

               With the layout name by calculation option and then only if the text in IssueType exactly matches a layout name.

               But that only switches layouts, it does nothing to insure that the correct records are visible on that layout.

               You need a script like this:

               If [ Issues::IssueType = "Meetings" // bring up related records on Meetings layout]
                    Go To Related Record [Show only related records; From table: Issues; Using layout: "Meetings" (Issues) ]
               Else If [Issues::IssueType = "Design Change" // bring up related records on Design Change layout]
                    Go To Related Record [Show only related records; From table: Issues; Using layout: "Design Change" (Issues) ]
               Else If [//continue for each possible Issue type.]
                

               End IF

          • 2. Re: Go to related record in a variable layout
            krod

                 Thank you! I'll give that a shot.