Percentage calculation issue

Hi, i faceing issue of calculation percentage.

I plan to make notification email for appraisal. Current function is 5 score. Now i plan to make percentage of appraisal for every satff. for example:

Jason Apprialsal score is 4. So percentage is 4/5=80%

I used code: {{ ((doc.total_score/5)*100)|round|int }}% to achieve it, but failed.

So please help me out.

hi,all, i solved issue. i created one field: percentage. and add custom script below:

frappe.ui.form.on(‘Appraisal’, {
refresh: function(frm) {
frm.set_value(“percentage”, (frm.doc.total_score * 100 / 5));
}
});