2 Replies Latest reply on Mar 10, 2015 4:31 PM by philmodjunk

    How to link a list-view button to a specific record



      How to link a list-view button to a specific record


      My solution is an automated flow-chart that takes user through a series of layouts based on their responses to Boolean questions. The main table has about 100 fields. When the user reaches the conclusion at the end of the flowchart, they mark a checkbox that sets a field from "in-progress" to a "final" status. Once final, their record needs to be marked as reviewed by a superviser. To accomplish this review function, I created a list that is sorted by the status (either "final" or "in-progress") and added a "review" button that takes the superviser to a flowchart summary.

      My problem is that the script that lauches the summary view does not go directly to the active record in the list; for example, if I have 10 records, serial #'s 1-10, that are displayed on 10 different lines on the review list, and each line has it's own "review" button, all 10 buttons take the superviser to record #1, regardless of which record is in focus on the list.  Is there a function that "gets" a specific record?


        • 1. Re: How to link a list-view button to a specific record

          Is it possible that the button isn't entirely in the body part, slightly overlapping into header or footer.  What's the script attached to the button?

          • 2. Re: How to link a list-view button to a specific record

            No such function is needed, but you need to check the design of your layouts and underlying data model. If Layout A is a list view and has "Table A" specified in the Show Records From drop down found in layout setup. And "Layout A|Form" is a form view layout that also specifies "Table A" in Show Records From, all your button would need to do is use Go to Layout to change layouts, provided that your button is placed in the body layout part and ato do this all in the same window. The mouse click on the button makes it the current record and since all layouts that specify the same table occurrence name in Show Records From share the same found set and current record (provided that you are in the same window), that record would then be the record you see in the Table A|Form layout.

            Since this is not happening, some aspect of your design is interfering. Note first, that I have described a list view layout as that is what you describe. If, on the other hand, you are using a portal to list these records, then you can't use a button with go to layout. Instead, you would use a button with Go To Related Records.

            And with either "list"--a list view layout or a portal, script triggers can be tripped by your button's change in layouts and this can interfere with the results you want to achieve.

            And in other cases, you set up a script performed by your button to copy your current record's primary key into a variable, that your script then uses as search criteria in performing a find on the layout that it changes to. This may be necessary if your Tutorial: What are Table Occurrences? names don't match in Layout Setup or you are moving the focus from one window to another.