7 Replies Latest reply on Apr 24, 2009 6:26 PM by synergy46

    Portal Row Problems...

    synergy46

      Title

      Portal Row Problems...

      Post

      Click HERE to see the sitation. 

      The application tracks real estate properties, improvement costs (ie, adjustments to basis) and vendors who supply the improvements.

       

      I have 3 tables:  

       

       

      Properties:    --------< Transactions >------------- Vendors

       

      My layout is based on properties.  My portal is based on transactions.   But, I have  Vendors::Name field on the portal that is a drop down that is based on VENDORS::NAME.  With Transactions as the basis for the portal, NAME is disabled.  If I base the portal on VENDORS, all fields work but the results of each new record are those of the previous record.

       

      What am I doing wrong?

       

      Thank you.

       

       

        • 1. Re: Portal Row Problems...
          Orlando
            

          Hi synergy46,

           

          It is definitely best to have your portal based on the Transactions TO for this, as the portal will always display the first record from Transaction and any time you have multiple Transaction records for the same vendor and Property will only show 1 row in the portal.

           

          With regards to the Vendor name, is it always inactive, or just on the last row when you are trying to create a new related record through the portal?

           

          If this is the only instance where I can think it would not work, this would be because the link between Properties and Vendors does not exist yet due to the join table, Transactions, has no record to link them. If that makes sense.

           

          The way around this is to place the Transactions::VendorID.pk on the portal and modify the value list to change the value list to display values from two fields, first VendorID.pk and then Name, and Tick the option to 'Show value only from second field'

           

          This will dispaly the vendors name in the value list, but populate with the ID, and if you use a pop-up the name will always display instead of the ID, otherwise you can lay the Vendor::Name field over the ID field and play about with the appearance so you see the name and not the ID.

          • 2. Re: Portal Row Problems...
            comment_1
              

            synergy46 wrote:

            I have  Vendors::Name field on the portal that is a drop down that is based on VENDORS::NAME. 


            That's not a good thing. The drop-down field should be Transactions::VendorID, and the value list should be based on Vendors::ID (with Vendors::Name being the second field). The Vendors::Name field SHOULD be non-enterable - otherwise you will be able to change the vendor's name in the vendor's record, which will affect ALL their transactions. And you certainly don't want to change it to ANOTHER VENDOR's name.

             

            If you want, you can set the value  list to "Show values only from second field", and change the drop-down to a pop-up. Then you won't need the Vendor::Name in the portal. But this requires vendor names to be unique.


            • 3. Re: Portal Row Problems...
              synergy46
                

              ================

              That's not a good thing. The drop-down field should be Transactions::VendorID, and the value list should be based on Vendors::ID (with Vendors::Name being the second field). Am I using Vendors::ID IN THE VL because it is the PK of Vendors?  Is that the 'rule'?The Vendors::Name field SHOULD be non-enterable - otherwise you will be able to change the vendor's name in the vendor's record, which will affect ALL their transactions. And you certainly don't want to change it to ANOTHER VENDOR's name.   I agree.  So, I guess the solution to being able to add a New Vendor is to put a "Add" button on the portal row, open a new window with a Vendors Layout and then add a new record.  Or, am I making this more difficult than it needs to be?

               

              If you want, you can set the value  list to "Show values only from second field", and change the drop-down to a pop-up. Then you won't need the Vendor::Name in the portal. But this requires vendor names to be unique.

              ================

               

              • 4. Re: Portal Row Problems...
                comment_1
                  

                synergy46 wrote:
                Am I using Vendors::ID IN THE VL because it is the PK of Vendors? Is that the 'rule'?

                Yes. All your core relationships should be based on matching the primary key of the parent table (Vendors, in this case) to the corresponding foreign key in the child table (Transactions). This makes sure you can modify any detail of the vendor (other that the primary key, of course) without breaking your links.

                 


                synergy46 wrote:
                So, I guess the solution to being able to add a New Vendor is to put a "Add" button on the portal row, open a new window with a Vendors Layout and then add a new record.

                It's one possible solution, yes. It really depends on how you prefer to build your user interface and the workflow. In any case, you cannot add a new vendor just by typing their name into a portal of Transactions (or at least you shoudn't - I've seen some convoluted attempts to make this work, but IMHO their flaws outweighed the advantage).

                 



                • 5. Re: Portal Row Problems...
                  synergy46
                    

                  That's not a good thing. The drop-down field should be Transactions::VendorID, and the value list should be based on Vendors::ID (with Vendors::Name being the second field). The Vendors::Name field SHOULD be non-enterable - otherwise you will be able to change the vendor's name in the vendor's record, which will affect ALL their transactions. And you certainly don't want to change it to ANOTHER VENDOR's name.

                   

                  If you want, you can set the value  list to "Show values only from second field", and change the drop-down to a pop-up. Then you won't need the Vendor::Name in the portal. But this requires vendor names to be unique.

                   

                  This is not even near working.  Can I send you the file?

                   

                   

                   

                  ==========

                  I added VENDORS::VendorID.pk as the dropdown on the portal.  With the portal based on Transactions

                  • 6. Re: Portal Row Problems...
                    comment_1
                      

                    synergy46 wrote:

                    I added VENDORS::VendorID.pk as the dropdown on the portal.  With the portal based on Transactions


                    But I said the drop-down field should be Transactions::VendorID.


                    • 7. Re: Portal Row Problems...
                      synergy46
                        

                      WHEW!  I have gotten it to work.    It is quite a work around to get it to do what I want.  Now I have to "go to school" and figure out 'why' it works the way it does.

                       

                      Thanks much for your help.