September 13, 200223 yr Newbies Okay, it seems simple enough, but I give up. How does one define the following fields and get them to play together nicely. The fields are: Gross price = Net * 1.15 Net price = Gross * .85 Sometimes Gross price will be entered first into the database and sometimes Net price. How do I get them to behave and not tell me I'm attempting to make a circular definition? I've fumbled long enough with the "If" function to know that I don't know enough. Can someone please help me, immediately if not sooner. :crazy:
September 13, 200223 yr Hi, you need a couple of more fields. I will try to enclose example. Hope this helps! [email protected] Cost.zip
September 13, 200223 yr The secret is that you need four fields: GrossPriceEntry (number) NetPriceEntery (number) cGrossPrice (calculation, number) = If(notIsEmpty(GrosstPriceEntry), GrossPriceEntry, Round(NetPriceEntry*1.15, 2)) cNetPrice (calculation, number) = If(notIsEmpty(NetPriceEntry), NetPriceEntry, Round(GrossPriceEntry*0.85, 2)) On your layout in Layout Mode, using Format --> Field Format, uncheck the "allow entry" option for cGrossPrice and cNetPrice. Also in Layout Mode, format cGrossPrice and cNetPrice as opaque, stack cNetPrice on top of NetPriceEntry and stack cGrossPrice on top of GrossPriceEntry. How it works: If you click on the net price "stack" of fields you will go to the lower field (NetPriceEntry). The same thing works for the gross price "stack". This allow either entry or calculation for one of both fields. -bd
September 13, 200223 yr Author Newbies thanks for the rapid reply. Your help is truly appreciated. For an even more elegant solution, check out the second reply to my query from LiveOak (administrator) Many thanks for taking the time to respond!
September 13, 200223 yr Author Newbies Many thanks LiveOak. You solution is elegant in both its ease and simplicity. I really appreciate it!
Create an account or sign in to comment