Multiply two integer fields and save the results to another field.

I'm trying to multiply the values stored in two integer fields and save the results in another integer field. I'm not sure if I have the correct syntax for the multiplier in my code or if my saveInto statement is correct. The Total estimated capacity field is not displaying the results of the value in the Number of files field multiplied by the value in the Average file size field  This is my code:

a!integerField(
  label: "Total estimated capacity",
  value: ri!totalEstCapacity,
  saveInto: {
    a!save(ri!totalEstCapacity,ri!numberOfFiles*ri!averageFileSize)},
  refreshAfter: "UNFOCUS",
  required:true,
  validations: {}
)

Can someone help with this?  Thanks...

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi Yeswanththiyarir,
    As Informed by Mike The calculated value will be displayed in the Total Estimated Capacity Field, but it will not save in the corresponding rule Input until the user interacts with the Total Estimated capacity Component.

    The other way is like you can always save the calculated value on any of the button's saveInto. But this is not a recommended way since the form may contain multiple buttons and you need to have this piece of code in Every button's saveInto.

    So the better way is as per Robert Shankin's Approach.
Children
No Data