ron G Posted July 15, 2009 Posted July 15, 2009 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?
ron G Posted July 16, 2009 Author Posted July 16, 2009 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
ron G Posted July 16, 2009 Author Posted July 16, 2009 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now