millmaine Posted August 22, 2012 Posted August 22, 2012 I have a field which shows the Total Cost of a number of items. I also have a field to show the Total Value of the items. The Total Cost field is a calculation field. The Total Value field is a number field for the operator to complete. What I would like to do is have the default Total Value = Total Cost, while allowing it to be overwritten by the operator. If I make the Total Value field a Calculation field then it can't be overwritten by the operator If I make it a Number field with an auto-enter calculation saying =Total Cost it just doesn't seem to work. I've tried GetField. I've tried creating a second occurrence of the table and using Lookup. It seems as though it should be simple but I'm bamboozled.
Ocean West Posted August 22, 2012 Posted August 22, 2012 the auto enter field should uncheck the box that overwrites existing contents. Your calculation should be: Case ( isEmpty ( self ) ; Total Cost ; self ) This way if the field is EMPTY then it uses the total cost field - but as soon as you enter a value in to the field then it uses its own contents.
millmaine Posted October 23, 2012 Author Posted October 23, 2012 I had thought this worked but there is still the issue that calculated value just doesn't seem to calculate.
millmaine Posted October 23, 2012 Author Posted October 23, 2012 Actually, it's a bit odd. If I enter a value in the Value field, then delete it, the default value appears. In other words it enters the calculated value. However if I do nothing the field remains blank. The whole point is to have the default value appearing without anything being done. Any further thoughts?
Ocean West Posted October 23, 2012 Posted October 23, 2012 You may consider this: TotalValue a number field users can enter to Overwrite the TotalCost calculation. TotalCost = Case ( not IsEmpty ( TotalValue ) ; Sum ( your_other_fields ) ; TotalValue ) Then using conditional formatting you can determine if the field TotalValue is empty by using some color fill or font. If you stack your fields so that the TotalCost is stacked on top of the TotalValue and only the TotalValue is allowed to click into when in browse mode. OR you can use another field format it as a checkbox with a 1 value - and use that as the basis for an Over ride Then you enter the Value but it's not used unless you also check the checkbox.
millmaine Posted October 24, 2012 Author Posted October 24, 2012 A variation on that works nicely. Thanks. Stacked fields has always felt a bit like cheating — but it's a good cheat!
Recommended Posts
This topic is 4471 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