Jump to content
Sign in to follow this  
Lee Strauss

overwriting calculations?

Recommended Posts

Lee Strauss

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

Share this post


Link to post
Share on other sites
bikergeek

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.)

Share this post


Link to post
Share on other sites
Maarten Witberg

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

Share this post


Link to post
Share on other sites
bikergeek

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.

Share this post


Link to post
Share on other sites
Maarten Witberg

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

Share this post


Link to post
Share on other sites
aaa

"In v7, you can opt to have it updated at all times". It is great, but in any cases it is not desirable, can i operate with it in V7.

Share this post


Link to post
Share on other sites
MrEase

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

Share this post


Link to post
Share on other sites
J Wenmeekers

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

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



×
×
  • Create New...

Important Information

Terms of Use