4 Replies Latest reply on Feb 16, 2010 1:03 PM by dennizzlegbizzle

    Portal reference question



      Portal reference question


      I currently work at a computer repair store and we use filemaker to create service records. Every customer has a portal with all of their computers listed. I want each row in a portal to have a button to create the service record for that specific computer. I have the button perform a script that passes the serial number to the service database.


      HOWEVER, it does not matter what button you press it selects the top serial number. I am pretty sure that I have refenced the tables correctly. I am not sure how to specify what record I want to pass.


      Thank you,

      Dennis Glasberg

        • 1. Re: Portal reference question

          That basic approach should work. What does the script attached to your button look like?


          • 3. Re: Portal reference question

            The problem lies in your script and you use a copy step that is not the best option for this operation also.


            After the End IF, put this:

            Set variable [$ID ; Value : SerialInformation::SerialID? (Can't see field name behind the portal setup dialog)]

            Set variable [$CustID ; Value : Customers::CustomerID ]


            Once you use Go To Layout to switch to a different layout, you exit the portal and the serial ID of the current portal row is lost, so you should capture this information before switching layouts.


            To pass the Serial ID on as a parameter in the perform Script call at the end of your script, you can now pass $ID as the parameter.


            Copy has two major failings when used in a script:


            Copy destroys any data the user may have copied to the clipboard

            Copy fails silently if the specified field is not present on the current layout--thus future edits of that layout can break your script and you won't get any obvious error messages telling you that this is why your script no longer works.

            • 4. Re: Portal reference question

              Thank you so much! That was my problem. I know that copying is a problem. I guess thats what happened when the former database administrator didnt care for user friendlyness.


              Thank you again!