Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Re-Calculate Value on field value change

Markisio December 22, 2022

Not sure how to explain this, but here its ,

 

I have ConfiForms Definition of the following

hourlyRate

allocation

cost (read only)

 

I have the following ConfiForms Rules to set value

Condition: allocation is not empty 

Set Value: cost = hourlyRate X allocation

 

On adding new record it work fine, however when edit it doesn't work unless I tab to allocation to force calculation rule again, any idea why?

 

I was thinking to do the following

if hourlyRate changes then clear allocation so I force the user to re-enter allocation, therefore the cost rule calculated again 

 

any help will be much appreciated :) not sure if there is away to force recalculation on edit mode or clear allocation on change of hourlyRate. 

 

thanks 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2022

Hi

So, your rule should be bound to the changes in the hourlyRate and allocation fields (first parameter in the rule), and also to be set to be triggered on user action only

Little demo: http://recordit.co/M7Syr4qcu3

Alex

Markisio December 23, 2022

Thanks @Alex Medved _ConfiForms_  it works now, originally I had allocation, hourlyRate in the bound for change 

 

however this is what I have done to make it work. I swapped hourlyRate with allocation in bound to change, but I noticed in Add new record it stopped working but edit works fine.

So I had to create 2 rules one for hourlyRate in bound change and another for allocation in bound to change 

 

now both edit and add mode work fine.

I am sure there is a better way rather creating 2 rules doing the same thing :) 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2022

The example I have recorded for you doesn’t need 2 rules and works just fine with one single rule for create and updates

Like Markisio likes this
Markisio December 23, 2022

Thats right I looked at your video again and you didn't have space between the fields: allocation,hourlyRate . originally I had allocation, hourlyRate

now works perfectly with single rule :) thanks @Alex Medved _ConfiForms_ :) 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2022

Having a space there shouldn’t really matter 

unless you are on some old ConfiForms version (I recall we had that issue some time ago)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events