calculation between Objects

can anyone Check If the following code is correct .The final output is not displaying in the required field. It is for calculating loan interest

a!formLayout(
contents: {
a!sectionLayout(
contents: {
a!columnsLayout(
columns: {

a!columnLayout(
contents: {
a!integerField(
label: "Amount Of Loan required",
labelPosition: "ABOVE",
value: ri!LM_CustomerDetails.loanid.amountOfLoanRequired,
saveInto: {
ri!LM_CustomerDetails.loanid.amountOfLoanRequired,
a!save(
ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
if(
and(
not(isNull(ri!LM_CustomerDetails.loanid.amountOfLoanRequired)),
not(isNull(ri!LM_CustomerDetails.loanid.interestRate)),
not(isNull(ri!LM_CustomerDetails.loanid.repaymentPeriod))
),
((ri!LM_CustomerDetails.loanid.amountOfLoanRequired * ri!LM_CustomerDetails.loanid.interestRate)/ri!LM_CustomerDetails.loanid.repaymentPeriod),
{}
)
)
},
refreshAfter: "KEYPRESS"
)
}
),
a!columnLayout(
contents: {
a!floatingPointField(
label: "interest rate",
labelPosition: "ABOVE",
value: ri!LM_CustomerDetails.loanid.interestRate,
saveInto: {
ri!LM_CustomerDetails.loanid.interestRate,
a!save(
ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
if(
and(
not(isNull(ri!LM_CustomerDetails.loanid.amountOfLoanRequired)),
not(isNull(ri!LM_CustomerDetails.loanid.interestRate)),
not(isNull(ri!LM_CustomerDetails.loanid.repaymentPeriod))
),
((ri!LM_CustomerDetails.loanid.amountOfLoanRequired * ri!LM_CustomerDetails.loanid.interestRate)/ri!LM_CustomerDetails.loanid.repaymentPeriod),
{}
)
)
},
refreshAfter: "KEYPRESS",
)
}
),
a!columnLayout(
contents: {
a!integerField(
label: "Repayment Period",
labelPosition: "ABOVE",
value: ri!LM_CustomerDetails.loanid.repaymentPeriod,
saveInto: {
ri!LM_CustomerDetails.loanid.repaymentPeriod,
a!save(
ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
if(
and(
not(isNull(ri!LM_CustomerDetails.loanid.amountOfLoanRequired)),
not(isNull(ri!LM_CustomerDetails.loanid.interestRate)),
not(isNull(ri!LM_CustomerDetails.loanid.repaymentPeriod))
),
((ri!LM_CustomerDetails.loanid.amountOfLoanRequired * ri!LM_CustomerDetails.loanid.interestRate)/ri!LM_CustomerDetails.loanid.repaymentPeriod),
{}
)
)
},
refreshAfter: "KEYPRESS"
)
}
),
a!columnLayout(
contents: {
a!integerField(
label: "Loan Repayment Per Month",
labelPosition: "ABOVE",
value: ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
saveInto: {
ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
a!save(
ri!LM_CustomerDetails.loanid.loanRepaymentPerMonth,
save!value
)
},
refreshAfter: "UNFOCUS",
readonly: true()
)
}
)
}
)
}
)
}
)

  Discussion posts and replies are publicly visible