3 Replies Latest reply on May 4, 2009 3:55 PM by philmodjunk

    Relationship quandry.  Is there an easier way?

    synergy46

      Title

      Relationship quandry.  Is there an easier way?

      Post

       
      Here is the setup:  I am trying to create a stock  and option tracking program.  To that end I have the tables designated below.  On my 'transaction' table, I have the STOCKID.FK which is a POPUP showing the FIELDS  STOCK::StockID.PK and SYMBL.  In the 1st portal is a record of Stock Transactions (StockTrans).  In the lower portal, is a record of the OptionsTransactions (OptionTrans).
       
      The portals seem to work well but the stockID.FK field a) Will not let me make a different selection than the first record???? and b) I would like that field, that when selected, to show just the options pertaining to that particular stock.  For example, if I click AAPL when I navigate to the 2nd portal in the OPTIONID.FK field I would like to see just he options for AAPL and no other stock.   (Yes, OPTIONID.FK is a popup that shows all options regardless of underlying stock)
       
       

        • 1. Re: Relationship quandry.  Is there an easier way?
          philmodjunk
            

          "the stockID.FK field a) Will not let me make a different selection than the first record????"

          First record of what table?

           

          "I would like that field, that when selected, to show just the options pertaining to that particular stock."

          Presumably, the options are listed in the Options table for that StockID.FK value? If so define a relationship linking OptionTrans::StockID.fk to Options::StockID.fk. Use this relationship in a value list definition and you should be able to get a list of values that is filtered down to just those for the current StockID value.

           

           

           

          • 2. Re: Relationship quandry.  Is there an easier way?
            synergy46
              

            Nice idea but it didn't work.  It created an 'and' relationship between optiontrans:: and options:: .  Yet, the dropdown still is very 'squirrely'.  For example, I put two stocks in the stocks table:  ID:14 wells fargo, wfc  ID: 15 Apple, AAPL

             

            These two stocks show in the drop down.   But, : a) When I select WellsFargo, Apple shows and I must 'reselect' WellsFArgo and then it 'sticks'.  Also, sometimes, selecting WellsFargo causes the buy/sell portal record to 'disappear'after I click out of the popup.  The records are still in the stocktrans table; along with some mysterious blank rows????

             

            What I am looking for is:

             

            The ability to select a single stock symbol.  (I thought a popup might work well for this but not so far)

             

            In the first portal below are all transactions of buying and selling the selected popup stock.

            In the portal below that are all transactions of buying and selling that selected poopup stock options.   (Options are based on a Company stock symbol).

             

            All this would compose 1 record of the Transactions layout which is based on Stocks???  Going to a different record would select a different stock/symbol and differente transactions in the stock and option portals...   I hope I am being clear.

             

             

            • 3. Re: Relationship quandry.  Is there an easier way?
              philmodjunk
                

              "It created an 'and' relationship between optiontrans:: and options:: ."

              That tells me you didn't create a new Table Occurrence, I gather you just attempted to drag from one field to another and that, as you described, modified and existing relationship instead of creating a new Table Occurrence.

               

              You have to use the buttons at the bottom of the relationship graph to create your new table occurrence first, name it, and then drag to create the relationship. Select the Options table occurrence, then click the button with two green, overlapping plus signs to generate a new table occurrence. Then follow the rest of my instructions. (And edit your modified relationship to remove the extra pair of fields to put it back the way it was also.)