Form with Changing Rates

  • 19 April 2016
  • 3 replies
  • 5 views

Badge +8

Hello Community,

I've set calculation filed to not recalculate on edit mode due to persevering the information since we have rates that change once a year and those of based on what the user puts as their travel dates on the form. My question is due to user error can we have calculation control recalculate based off a certain modification? 

Example: So user enters wrong date and submits the form. They see this and go in and edit the information for dates so recalculation needs to be had.  This would be the only time that this would need to be done and any other time the form goes into edit mode the calculation fields shouldn't recalculate the formula.

Thanks,

Kevin


3 replies

Badge +8

Anyone have any ideas.

Userlevel 7
Badge +17

Hey Kevin, I have a few thoughts, but I wanted to understand more about the calculation formula. Also, what is the actual trigger you need for the recalculation, is it the date change? I assume the formula would account for that. There is a jQuery way to trigger the calculation if programmatically necessary, but I don't think you will have to do that right away.

As a best practice, don't store important historical data in a calculated field. Use a static field instead. You could even have a workflow perform the calculation and update a field and have it read only at all times to the user if necessary. One of these method could be a better alternative than manipulating control functionality.

Badge +7

Hi Kevin,

I agree with Andrew on the calculation fields.  You can probably work with normal fields

One way of achieving conditional calculation is the following.  You will probably have to add a field to your form that is hidden on NewForm mode. On EditForm this field can be shown with one of two options.  If they select option two for instance you can start the workflow on edit with a conditional start

183017_pastedImage_1.png

Just ignore the values here...this is just screenshots of an existing workflow of mine

183016_pastedImage_0.png

Then only do certain calculations otherwise do nothing.

Let me know if I need to explain anything in more detail

Reply