We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Calculation not refresh automatically

jforget1
jforget1 asked
on
Medium Priority
299 Views
Last Modified: 2013-12-18
Is there a way to maybe use a button to allow for a formula to be recalculated only when the button is clicked. Have the formula below for an order form, but we want to not recompute the value as the months move along. If I created a "Calculate" button that the user clicks to see the value but it will stay at that value unless the button is clicked again. Any ideas on how this might be possible

remaining_months :=12 - @Month(@Today);

(38 * remaining_months) + 72
Comment
Watch Question

CERTIFIED EXPERT
Commented:
@Command( [ToolsRefreshSelectedDocs] )

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
CERTIFIED EXPERT
Top Expert 2007
Commented:
Or simply do all calculations in the button, and not on the form, so values only change when the button is pressed.


I hope this helps !
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
F9

Author

Commented:
SysExpert,

I have the formula I am using in a button, how do I get this into a visible field. Do I use a computed value field? Standard field? How do I got the hand off of the calculated value from the button into a field the user can see?
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT
Commented:
Try this in your button:

remaining_months :=12 - @Month(@Today);
FIELD YourField:= (38 * remaining_months) + 72

Author

Commented:
That worked, one last question, right now I have several area which appear dynamically based on the user selection, for this I have the Automatically Refresh Fields on the form design. If I leave this would it automatiacally refresh the value forced into this field by the button click when we get to next month? Or does using this method only refresh when clicked?
CERTIFIED EXPERT

Commented:
I believe only when clicked.
but again - you can add @postedCommand( [ToolsRefreshSelectedDocs] )  as last line in the button

Author

Commented:
Thanks to all for the help here.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Normally, Automatically Refresh Fields should be avoided. Only when you have a spreadsheet-like form it is useful.

Author

Commented:
OK thanks I changed it so my refreshing is happening at the field level and not the form level.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.