10 Replies Latest reply on May 25, 2010 4:40 AM by singerdf

    Portal Sorting

    singerdf

      Title

      Portal Sorting

      Post

      I have two tables:  Consignment and Stock #s.  I have setup a layout on the consignment table in which I have a repeating Stock # field.  This is related to the stock # in the Stock # table.  I enter a stock number in the Consignment layout and it auto fills the information from the stock # table.  I would like the stock # portal to stay as I have entered the stock #s.  At present it insists on sorting by the number.  I do not have any sort set up and cannot figure out how to turn this off.  

       

      Is it related to indexing?  Is it related to how the two tables talk to each other.  For now I have added the stock number to the portal and do not print the related stock # as they are all out sync.

       

      Thanks for any help,

       

      Debbie

        • 1. Re: Portal Sorting
          philmodjunk

          There are two places to look for a specified sort order for your portal:

           

          Double click the portal while in layout mode to bring up the portal setup dialog and make sure that a sort order was not specified for the portal.

           

          Go to Manage | Database | Relationships and find the pair of table occurrences that  represent your layout and portal. Double-Click the line linking them and check in the dialog that pops up for a specified sort order for you portal records. If there is a sort order specified, clear the check box.

          • 2. Re: Portal Sorting
            singerdf

            Hi, Phil.  You are quick and based on past instructions from  you, I knew to look in both places.  Nothing is checked which is what baffles me.

             

            Let me know what else I can do.  At this point, my work around is OK, not elegant.  I am more confused as to why it wants to sort.

             

            Debbie

            • 3. Re: Portal Sorting
              philmodjunk

              Those are the only two places where portals can have a specified sort order.

               

              Is this really a portal? (You meantioned a repeating field and portals genrally eliminate the need for a repeating field here.)

               

              You may need to get someone to examine your file directly. You can post a copy of your DB (save a clone so that it doesn't have any data) to a file sharing site and then post the link to it here. Then I  or another forum member can take a look at it for you.

              • 4. Re: Portal Sorting
                singerdf

                Can't post a copy just yet.  I work remotely and cannot get it to save to my desk top.  I will try and be more specific.  In the first table I have a field:  stock #.  It is a repeating field with 20 iterations.  This is the field that relates to the field stock # in a secondary table with all kinds of information about that item.  The layout shows stock # repeating and then the portal from the second table.  The idea is to put the stock number in the repeating field and the rest of the info shows up in the portal.  This works find as long as the stock # repeating field is in sequential order.  If it is not, the portal sorts them by stock #.  

                 

                As I already stated,  i do  not have any sort selected.

                 

                HOpe this helps for the time being,

                 

                Debbie

                 

                • 5. Re: Portal Sorting
                  comment_1

                  If your relationship and the portal have no specifed sort order, records in the portal appear in creation order (which may coincide with stock #).

                  IIUC, you want them to appear in the order of stock #, following the same order of stock #'s as the one in the repeating field. That's not going to be neither simple nor fast. You would need an unstored calculation field in the child table to figure out its stock # position in the repeating field. Then the portal could sort the records by this.

                  • 6. Re: Portal Sorting
                    singerdf

                    That seems to make more sense.  Is there a better way for me to do this task?  I am essentially creating a sales receipt. So I enter the item's stock # and it grabs all of the relevant information needed for the receipt from the Stock # table.  I had assumed the records would stay in the order I entered them.

                     

                    Thanks,

                     

                    Debbie

                    • 7. Re: Portal Sorting
                      comment_1

                       


                      Debra Singer wrote:

                      I am essentially creating a sales receipt.


                       

                      You should NOT use a repeating field for this. Instead, use a third table of LineItems, where each sold product will have an individual record*. This will solve your current issue as well as many others of which you may not be aware yet.

                       

                      ---

                      (*) You can see a basic demo here:

                      http://fmforums.com/forum/showpost.php?post/309136/


                      • 8. Re: Portal Sorting
                        singerdf

                        Thank you for the suggestion and example.  What I want is really simple.  I am having a hard time translating your invoice example for what I need to do.  

                         

                        I have an entire table with items for sale.  They all have unique ids:  stock #

                         

                        Now I have a receipt table in which I have customer info and have added the portal for stock # to show what each customer is buying.  I would like a way to type in the stock # and it fills in all the rest of the information for that item.  In the example you sent, it creates a new record each time.  

                         

                        Any further instructions would be very helpful,

                         

                        Debbie

                        • 9. Re: Portal Sorting
                          comment_1

                           


                          Debra Singer wrote:

                          I have an entire table with items for sale.


                          That would be the Products table in my demo.

                           


                          Debra Singer wrote:

                          it creates a new record each time.


                           

                          Yes, it does - and that is the proper way to do this. You want to keep the information of what is the receipt for somewhere - and the place to keep it is in the LineItems table, one record for each received item.

                           

                          To get the item data, you can either place a field from Items inside the portal (as the demo does with the product's name), or look it up into the LineItems record, as the demo does with price. The price is looked up (i.e. copied), so subsequent price changes do not modify existing invoices.



                          • 10. Re: Portal Sorting
                            singerdf

                            Slowly, but surely.  I was trying to avoid the line items table (not sure why).  So, it seems to be working better now.  

                             

                            Thank you for your patience and help,

                             

                            Debbie