July 15, 200916 yr I have a layout based on Stock: On that layout is related table portal based on StockTransactions. Above the portal is a global field called gOptionCommTrade. In the portal I have an 'Expenses" FIELD that calculates expenses and uses gOptionCommTrade. When I change the value of gOptionCommTrade, it changes (of course) all the previously entered Expenses amounts to reflect the new value in gOptionCommTrade. I tried to change the expenses formula: If (TransactionType="Expire"; "";contracts*Compute::gOptionCommTrade+Compute::gOptionCommission) ...so that I can 'store' the calculated value, but can't because the formula uses a Global Value. What is the work around?
July 16, 200916 yr Author Why a global field? With a global field, the user can enter one value, one time and it will show on every record on the layout underlying table. For example, by entering 9.95 at the top of the layout under Stock:, the expenses are automatically calculated for each row in the portal StockTrades. The down side to this is that if the Stock: expenses change to say $10.95 it changes ALL the previously entered records to the new expenses amount. This, of course, is not accurate or acceptable. There MUST be a work around for this. Perhaps use a lookup? Perhaps setup a new relationship? Your ideas are appreciated. Ron
July 16, 200916 yr Author Mr_Vodka, You are right. I didn't need a global fields. I solved it this way: I created a separate table called Commisions In it I put a calculated field called LINKFIELD. LINKFIELD is =1. I added this same field to the Stocks Database and established a relationship. Then I added Comissions::stkCommissions at the top of the layout to hold the current commission rate. In the portal I used StockTransactions::stkCommission with an AUTO ENTER Calculated value = Comissions::StkCommissions. And I checked "Do Not Replace Existing Values" just to be sure. ba boom... it works. Questioning the value of global fields got me started. Thank you very much! R
Create an account or sign in to comment