calculations in datalist
I have a data list with multiple columns and rows. The value in one field (in a specific column) is to be calculated from user's inputs in two other fields (in the same row). I managed to set it up by using "on change" or "lost focus" in each of the two fields. To do this, I needed to repeat the formula in each of the two fields, setting the value of the result field. I don't think repeating the formula is right way.
What I'm looking for is way to set the formula once, and get the result field updated when any of the two fields are updated on change or losing focus. No sure where this formula needs to be set, whether in the On Data Change of the row, or on page load etc. Or do I need to use a datamaster to do so?
If possible, can you attach the prototype here? We can take a look and see what might work best.
You can compress it to .zip/.rar format to attach it here.
If possible, can you attach the prototype here? We can take a look and see what might work best.
You can compress it to .zip/.rar format to attach it here.
Please see attached two files, one with lost focus which works, and one with in data change, which does not work.
Please see attached two files, one with lost focus which works, and one with in data change, which does not work.
Check out the attached prototype. Here's what we've changed:
We added an "On Focus Out" + "Data Master Action - Modify" event for each Input. Then, we added a Condition that will make sure that the events only trigger when the Inputs have been filled with a value.
Check out the attached prototype. Here's what we've changed:
We added an "On Focus Out" + "Data Master Action - Modify" event for each Input. Then, we added a Condition that will make sure that the events only trigger when the Inputs have been filled with a value.
That's what I was saying, I have to repeat the formula in each input. What if I had 5 input fields? This is not efficient. There needs to be a way to have the formula in one location and get the output updated when any input changes.
That's what I was saying, I have to repeat the formula in each input. What if I had 5 input fields? This is not efficient. There needs to be a way to have the formula in one location and get the output updated when any input changes.
If you want to have the event triggered when you focus out of an Input then you'll need to repeat the event on each Input.
If you want to have the event triggered when you focus out of an Input then you'll need to repeat the event on each Input.
Why on data change for the current row does not do the job instead? I. E. On data change set value of the result field to the multiplication of the other two fields. I tried but it does not work.
Why on data change for the current row does not do the job instead? I. E. On data change set value of the result field to the multiplication of the other two fields. I tried but it does not work.
"On Data Change" will only trigger when the Data Master has been altered. In the prototype you attached, you are only altering the Data List itself, but not the underlying Data Master. There might be a slightly more efficient way to sum the values, but ultimately you will need to repeat an event on each Input.
"On Data Change" will only trigger when the Data Master has been altered. In the prototype you attached, you are only altering the Data List itself, but not the underlying Data Master. There might be a slightly more efficient way to sum the values, but ultimately you will need to repeat an event on each Input.
Could you please provide example how On Data Change can be implemented in this case? Upon changing the input in a row, the input is to be saved to the datamaster, and then the result field is to be updated automatically due to the data change.
Could you please provide example how On Data Change can be implemented in this case? Upon changing the input in a row, the input is to be saved to the datamaster, and then the result field is to be updated automatically due to the data change.
I managed to resolve it guided by one of your published examples for flight status updated. Now I have the equation in the result field as a datamaster change triggerd by on data change, and I simple copy the value in each input field to the datamaster every time the input is changed.
I have to say I'm a bit disappointed as this is the second time that I face a problem and I don't receive a satisfactory response, then I have to go and find the solution by myself, taking out many days out of my project.
Regards,
I managed to resolve it guided by one of your published examples for flight status updated. Now I have the equation in the result field as a datamaster change triggerd by on data change, and I simple copy the value in each input field to the datamaster every time the input is changed.
I have to say I'm a bit disappointed as this is the second time that I face a problem and I don't receive a satisfactory response, then I have to go and find the solution by myself, taking out many days out of my project.
Regards,
File attached
File attached
Replies have been locked on this page!