2 Replies Latest reply on Jun 8, 2015 1:12 PM by SteveMartino

    Selecting a record from a portal (trying to use product selection in Invoices Starter as pattern)

    BarryYarkoni

      Title

      Selecting a record from a portal (trying to use product selection in Invoices Starter as pattern)

      Post

      I feel that I am missing a step in using the popover to select an item.  In the starter solution, the parameter returned is the item name and ID for the selected item returned as a parameter to the add item script.  But I am ending up with a list of ALL the popover items, not just the one clicked.  Any ideas what I'm doing wrong?  Apologies in advance from a newbie for asking what in retrospect will likely be a dumb question.

      In the starter solution, the button with the trigger is a grouped button.  What is it grouped with?  The script is being called with the parameter:  List ( All Products | Popover::Item ; All Products | Popover::PRODUCT ID MATCH FIELD ).  How does it select the values for only the portal line clicked?

      Thanks in advance to any and all for your help

        • 1. Re: Selecting a record from a portal (trying to use product selection in Invoices Starter as pattern)
          philmodjunk

          When you put a button in a portal row, clicking the button does two things:

          a) It puts the focus on that portal row.
          b) It performs a script

          because of a), any calculations in the script or the script's optional script parameter box that refer to fields from the portal's table (occurrence) will refer to fields from the record whose row was clicked.

          For more selection portals (both in and not in popovers) you might check out the examples found in:
          "Adventures in Filemaking - Enhanced Value Selection"

          Unlike the starter solutions, files in this series come with detailed descriptions, comments and other documentation describing how they work and how they were set up while remaining fully working examples of the concept they were set up to demonstrate.

          • 2. Re: Selecting a record from a portal (trying to use product selection in Invoices Starter as pattern)
            SteveMartino

            Also post a copy of the script. 

            In the starter solution, the button with the trigger is a grouped button.  What is it grouped with?

            Is the button have a script trigger attached and/or does Button Setup perform the script (sometimes both)?  If you cant tell by the Button setup, sometimes it's just easier to use the Script Debugger, click the button and see what script is called (which appears like what you did)  Many times a button has multiple 'layers'.  Could be a blank button, with a text object and a script grouped together.  When developing, this is done for many reasons, but usually it's just easier to group so you can copy/paste this button in other places or quickly move the button and keep all the 'layers' in the same orientation.  Some people will completely build a button or object from scratch, made up of multiple pieces and once built, want to replicate it many times.

            A word about ungrouping.  If you highlight and right click and Ungroup (you may have to do this more then once), it may kick a warning message about removing the script.  So make sure you know exactly which script, with the script parameters this button is calling.