Jump to content
Salesforce and other SMB Solutions are coming soon. ×

overwriting calculations?


Lee Strauss

Recommended Posts

is there a way to bypass a calculation in a special instance? ie. if for some reason we need to type in manual data into a calculation field, we would be able to do it.

 

any ideas?

 

thanks,

Lee

Link to comment
Share on other sites

You can't enter information manually into a calc field. What you can do is make the calc field check a static text field for a value and use that value by default, and the calculation if the static field is empty.

 

Then you just have to set up the interface so that the user is directed to the correct field for manual entry of a value. One way would be via a script which activates when the user clicks on the calculation field in browse mode. (If your users ever search the calc field in find mode, you'll want the script to check if Get ( WindowMode ) = 1 [find mode] and exit script if so.)

Link to comment
Share on other sites

you can use a normal number field and set it to auto-enter a calculation. You can then simply overwrite the outcome. It will be updated if the fields referenced by the calc change, unless you uncheck this option.

 

kjoe

smirk.gif

Link to comment
Share on other sites

kjoe, are you saying that the value of a field in an existing record will be changed by an auto-enter calculation if the value of a filed referenced in the calculation changes?

 

I thought auto-enter calcs *only* applied at the time a new record is created.

Link to comment
Share on other sites

yes, i tested this. In v6, the calc will only update if the field is cleared first. In v7, you can opt to have it updated at all times.

 

kjoe

smirk.gif

Link to comment
Share on other sites

I would create a new not calculation field (CalcNot) and change the calc field to -If (IsEmpty(CalcNot);WhateverYouCalculated;CalcNot).

To use this you can put the CalcNot field right below the Calc field and change the Calc field so it won't let you enter in Browse mode. this way when you try to enter in Browse mode it will enter and make editable the CalcNot field. To search data you use the Calc field and noone will even know they're using two fields.

hope this helps

Link to comment
Share on other sites

To go further on Henk’s solution, if you want the calc field revert to its original calculation without the user to clear the field in order to update, you can do something along these lines:

 

Create a field Key – calculation, number = the original calculation

Create a Match field – calculation, number = 0.987654

 

Make a self join relationship based upon the Match field.

 

Redefine Henk’s CalcNot field to be a lookup based on the Self Join relationship, choose "use..." and leave the box empty.

 

This way you can use the same technique for text fields

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use