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
Of course we will not make any changes into sswilliams code except for the value to display. I think williams code is already doing the job of saving into the rule inputs, so I suggested to display the value as well. Here is the code I suggested: a!integerField( label: "Total estimated capacity", value: ri!numberOfFiles*ri!averageFileSize, saveInto: { a!save(ri!totalEstCapacity,ri!numberOfFiles*ri!averageFileSize)}, refreshAfter: "UNFOCUS", required:true, validations: {} )
or we could also do this:
a!integerField(label: "Total estimated capacity",value: ri!numberOfFiles*ri!averageFileSize,saveInto: ri!totalEstCapacity,refreshAfter: "UNFOCUS",required:true,validations: {}) Thanks Yeswanth.