Hello, i am trying to save the value in the custom child table but facing problem while using the frappe.ui.form .on function…Here are the details about my problem:
This is my child table. I am calculating two time fields and setting the result in the third table.But when i save it with update button it does not show the result at once. Like this:
But i want it to behave like the normal way. i want to see the result after submitting the result… How can i do that. I have tried to do them by using their documentation and all other suggestions. Have not found any solution.
@ROHAN_JAIN1 is correct, script must be inside of trigger, and in your case triggers should In Time and Out time fields name, instead of refresh. so it will calculate difference when In Time or Out time value is changed.
Brother, today i am doing thje same thing in the parent doctype…There is field name is Late. The field is a read only field and it will show yes or no if an employee comes late at the office. I am tring to triggering the field but nothing is changing… I am providing some screen shot and please point out where i am doing the blunder.
You are setting the value of is_late field to be yes or no.
The issue here is you need to change the field name to be triggered upon. You are calculating the value of is_late based on the office_in_time. So you need to keep office_in_time in the trigger field.
@Arif_123
Is your document save/submitted?
are you are trying to set the value of is_last after save?
according to code, it will work if the office_in_time value is change.