1 Reply Latest reply on Jul 25, 2012 3:54 PM by philmodjunk

    Problem with Lookup function in Estimates Starter Solution

    JessicaSpencer

      Title

      Problem with Lookup function in Estimates Starter Solution

      Post

      (THE BACKSTORY) I have been trying to adapt the "Estimates" starter solution to help me analyze the profitablity of product packages.  I have been running two files side by side:  my version and an un-modified version so I can monitor how changes I make affect the performance of the file.

      In the "Package Details" layout, my version of the "Estimate Details" layout, the portal displays records from the "Package Data" table, my version of the "Estimate Data" table.  The "Item" field is a drop down menu that uses the "Item" field of the "Products" table as values.  That same "Item" field is the match field between the "Products" table and the "Package Data" table.  

      (THE ACTUAL PROBLEM) In turn, the next field, "Cost" is set as a number field that is indexed, auto-enter data, lookup that should return the "Cost" field from the "Products" table according to the "Item" match field.  Nothing happens.  The field remains blank.

      I thought maybe it was a problem with the portal, so I created a test layout and tried to run it there, and it still didn't work.  I thought maybe it was a problem with the drop down menu not being recognizable, so I changed it to a normal edit field, and entered my item manually, but it still didn't work.

      I am quite new to filemaker, but normally quite capable of following directions, even complex ones, and I just can't figure out why this doesn't work.  Everything I have read indicates that it should.

      Lastly, I have moodified something in my file that is making the portal not work quite right, either.  I have the one line item, but it doesn't want to create a second line item.  Clicking the "Add Line Item" button only creates a new record in the "Package Details" table as opposed to the "Package Data" one.  How can I adjust that?   

      I put a copy of my file in Dropbox in case anyone wants to take a look.  https://dl.dropbox.com/u/16527369/Package.fmp12 

      I'm sorry for all the extra junk in it....I have not taken the time to go through and eliminate the unused fields from the starter solution. I tried to just eliminate them all in one swell foop, but it created too many errors and script problems, so I am going to have to go through and clean it up one by one once I get it working the way that I want.

       

      Thanks in advance for your assistance.  (and expertise!)

       

      Jessica

        • 1. Re: Problem with Lookup function in Estimates Starter Solution
          philmodjunk

          To those interested, the above download link does not work until you append ?dl=1 to the end of the URL given.

          Problem 1:

          Your relationship is PackageDate::Item = Products::Item

          Change it to PackageDate::Item = Proucts::ProductID

          and be sure to modify your value list to enter ProductID instead of Item. Item can be the secondary field, but Products::Item is not set up with an auto-entered serial number as is needed to be sure that the field uniquely identifies each product record.

          Problem 2:

          Open Manage | Database | Relationship and double click the line linking Packages to PackageData. In the Edit Relationship dialog that pops up, select "allow creation of records via this relationship" for packageData. You have this option enabled for Products to PackageData and this makes no sense and creates a small chance for errors so I recomend removing that option.