***ANDY*** Posted January 22, 2005 Posted January 22, 2005 Hello, An apparent simple thing causes me some headache; I have following 3 fields: "COST", "DISCOUNT" and "DISCOUNT IN %" I want to either enter a $$ amount into field "DISCOUNT" and then get the percentage result of that $$amount related to "COST", OR enter a % amount into field "DISCOUNT IN %" and then receive the $$ amount in field "DISCOUNT". What I did: enter calc for "DISCOUNT" = ("COST" * "DISCOUNT IN %") ./.100 and enter calc for "DISCOUNT IN %" = ("DISCOUNT" ./. "COST")*100 When I do this I get the message that this would cause a circular definition after I enter the second calculation. Is there any way around this? Thanks, Andy
BobWeaver Posted January 24, 2005 Posted January 24, 2005 The easiest fix is to have two sets of fields and then stack them. Have two regular number fields for discount and Discount In %, and then two calculated display fields cDiscount and cDiscount In % calc for "cDISCOUNT" = case(isempty(DISCOUNT), (COST * DISCOUNT IN %) /100, DISCOUNT) calc for "cDISCOUNT IN %" = case(isempty(DISCOUNT IN %)(DISCOUNT / COST)*100,DISCOUNT IN %) Set the field options for the calculated fields to NOT allow entry, and then stack the calculated fields over top of the entry fields. The display fields will show the calculated value, but when you click on them you will actually be entering/editing data in the entry field underneath.
Recommended Posts
This topic is 7584 days old. Please don't post here. Open a new topic instead.
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