5 Replies Latest reply on Nov 12, 2012 9:42 PM by ls441

    Portal relationships


      This is a question regarding portals. I'm new to TechNet, so I hope this is cogent.


      I have a layout where the intent was to display 5 different product options for comparison, like the apple store when comparing specs to buy a computer. The goal is to present 5 candidates from the inventory file, and record the item selected.


      The layout context is the table Sales_offer which is related to Inventory via the stock number. There are 6 fields in Sales_offer of importance: Stock# and Candidate_Stk#1, thru 5, Each is related to a different Table occurance of Inventory.


      The Layout has 3 tabs, A) a portal for the selection of the 5 stock numbers to populate the comparison, B) the 5 sets of data as a vertical comparison, C) the selected item in full detail


      My intent was to have the customer view Tab A to select an inventory item by clicking on a portal line and to transfer the stock# from the selected portal line to the next unfilled candidate instance in Tab B.


      Great plan, but I have not been able to find a way to display all inventory records in the portal.


      Inventory has a field named INV_status which contains text constrianed to the values "INV", "Pending", or "Sold". The Sales_offer table has a global field containing "INV". I was hoping to use a relation from the Sales_offer global field to Inventory::INV_status to allow the portal to display all inventory records, but I can't get it to work.


      This amateur would appreciate any tips!

        • 1. Re: New to Filemaker

          Hello / Welcome,

          Your question is well formed, thanks.


          Just to get you started on the portal element I've put up a sample file.

          There are more elaborate methods using the list function and script triggers, etc. But hopefully this will get you under way.

          This uses single row multiple portals.



          1 of 1 people found this helpful
          • 2. Re: New to Filemaker

            Hi Is441, usbc is getting you going and I agree your question is well-formed but your subject leaves much to be desired.  :^)


            Can you change it to something which identifies indicates the type of issue?  This helps when others with similar problems try to search for answers.  Thank you!!

            • 3. Re: Portal relationships

              Hi LaRetta,


              Thanks for the advice.  At first I was confused because I had not noticed the edit discussion function.  Didn't know you could change something already posted.


              I'm just now getting restarted with FM.  I wrote an enterprise level application using FM back in the late 80's (Original Macintosh) but that was before FM went relational.  I would have died for some of the scripting functionality I see now,, but I'm having a bit of trouble sorting out relationships.


              Thanks again, I'll try to keep the post names informative.

              • 4. Re: New to Filemaker

                Dear HTH,


                Thanks for the reply.  The single row multiple portals are great and I had planned on using them for displaying comparisons, but my real problem was in the selection of different candidates to display.


                To select a record for display requires some knowledge, ie product description, stock number, part number etc.  Normally you can use a pop-up or drop-down field as you have, to display instances for the user to select.  This is limited however and requires the user to know what they want.


                In this case I was trying to create a portal on a tab to allow the user to view the entire Inventory, and on that tab provide functionality to sort by field(s) and narrow the found set until a desired option is in view.  Then, transfering the appropriate key from the selected portal line to the other tab to populate the comparison display.  It is this selection process where I am having difficulty, as I seem unable to get the portal to display all inventory.


                Attached is a simple example where I tried to establish a Table Occurance of Inventory with a many to many relationship.  Both the local key and foreign key have the text "INV" in all records, so I don't understand why the portal will not show these records. 


                Thanks again, I'm grateful for any insight.

                • 5. Re: New to Filemaker

                  After doing some reading on Join tables and convincing myself it was a mystery,  I found a way to present the full Inventory file in the portal and select the 5 candidates for comparison.  Attached is a simple demo file.


                  Normally the portal would be on a seperate Tab and the comparison diaplay would run vetically, but this is just the bones of the structure.


                  The trick was to set a cartesion relationship (an x on the relationshop chart) between the sales_offer tqble and a table occurance of the inventory file.  That allowed all Inventory records to show on the portal, even if the principal Stock# relationship was a null.


                  Now, if the user clicks into a portal line to select it and then clicks one of the 5 select buttons, the stock# of the portal line is transfered to the associated comparision position.


                  Then, after the 5 offereings were reviewed, one of the 5 is selected using the appropriate button, the Sales offer is complete (would normally be locked at this point) and we have a record of the financials of 5 offerings and the accepted offer.


                  Before I run off and spend much time on this, I would appreciat any comments on why this might be a bone-head idea.