Jump to content

calculation vs calculated value


This topic is 4195 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4195 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.