How to take result of calculation in a form and subtract from a value in another form
I'm using the following code on successful form submission to perform a calculation and enter the result into a field a shown below
- input.Space_Used = ifNull(input.Area_In_Square_Meters,0) * ifNull(input.Total_Stock,0);
I now need the result above, the value from the field "Space_Used" to be subtracted from a value in another form depending on what is selected in another filed in this same form.
So for example i have a field "Location" which is a dropdown and contains a value from another form\report named "All_Location_Spaces" and takes it's value from the field named "Location Name" and each record will have a number in a field named "Total Space"
So for the field in my first form i want to subtract the value from "Space_Used" - "Total Space" and display this result in the field "Space Free"
I'm not sure i managed to explain this very well