Help for configuring the calculation on client scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 10:46 AM
I have below requirement for service portal.
there is a Issuance of Loan eligilibilty for one of the portal form.
i am not understanding how to calculate below .
Loan amount to be issued =((Basic pay*17% + HRA) *12) *(15 years or number of years)
I am not understanding how to calculate above calculation using catalog client script.
anyone has achieved similar requirement ? Please share it will be helpfull

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 11:24 AM
@Are Kaveri If you have variables representing Basic pay, HRA and number of years then simply it is a matter of multiplying the numbers in the catalog client script.
//Calculation
Loan amount to be issued =((Basic pay*17% + HRA) *12) *(15 years or number of years)
var basicPay = g_form.getValue('basic_pay');
var hra = g_form.getValue('hra');
var number_of_years = g_form.getValue('number_of_years')?g_form.getValue('number_of_years'):15; //if the field number_of_years is empty then consider 15
var loanAmount = ((basicPay*17)/100+hra)*12*number_of_years;
Hope this helps.