0 Replies Latest reply on Dec 14, 2014 11:41 AM by ultranix

    Relationship issues

    ultranix

      Title

      Relationship issues

      Post

      I am trying to accomplish options chain calculator. The idea of it is like this - in parent table (PAY) I store price and other data of the stock. I have another table CHAIN, which always has 7 records (3 out-of-the-money 1 at-the-money and 3 in-the-money records). And when you browse through records, the CHAIN table (in the portal) displays prices of 7 closest options picks from current stock price.

      I almost got this thing to work, except for one thing - relationships. When it's static - i.e. when I put tick (stock symbol), date and price_now manually - it works like charm. But I need for it to be automatic, i.e. PAY::close = CHAIN::price_now, PAY::date = CHAIN::date and PAY::tick = CHAIN::tick.

      I could enter it (i.e. values for CHAIN::price_now, CHAIN::tick and CHAIN::date) via script, but it would be slower. I need it to be automatic. I just don't know how could i set the relationship, as CHAIN table is not going to contain any more than those 7 records, CHAIN::tick is always different dependent on the picked stock and date varies also. I cannot think of any static field in order to make "a match". But I need to.