2 Replies Latest reply on Jul 26, 2012 5:48 AM by philmodjunk

    Click button to go to correct record

    jackmac

      Title

      Click button to go to correct record

      Post

      Hi,

      I've created a file which has two tables: customers and orders. I have created a form which allows me to navigate to the correct record.  The idea being click customer and it shows me their details and all they have bought.

      I have used a portal to pull in records from the orders table which matches client_ref_no then gets client_order_no.  I end up with a list of say 5 orders for my 1 client.  I want to be able to click a button and look at the specific order for that client.

      I can get the list to show no problem, when I click the button beside the record it only ever goes to the first order for that customer and not the specific record.

      Any ideas?

      Thanks

      Jack

      portalresult.png

        • 1. Re: Click button to go to correct record
          Sorbsbuster

          Set the button to run a script:

          Go To Related Record ( The Table Occurance That The Portal Is Based On ; A Table that the shows orders ; [Match Current Record Only] )

          Note that you refer to seeing the 'order', but the portal you are clicking in is entitled 'Invoices'  If you want to click on an invoice record but see an order record, that will be a bit different.

          • 2. Re: Click button to go to correct record
            philmodjunk

            If you have a script that uses Go To Releated Records and it's only going to the first record in the portal, there's a good chance that something in your script is losing the focus on that record. Commit Records, for example will return the focus to your customer record and produce such a result. Feel free to upload a screen shot of your script if you can't figure this one out.