Fill a field with the result of a javascript calculation
Posted: 2020-10-21 17:38
Hello everybody.
I have a "budget" table with a "human_resource" field, a "hours" field, a "hourly_cost" field and a "allocated_quote" field
The "human_resource" field and the "hourly_cost" field are lookup fields that point to the "name" and "h_cost" fields of the "human_resources" table respectively. In the "budget" table the "hourly_cost" field is filled in automatically when the "human_resource" field is selected.
I would like to create a javascript code for the "budget" table which, after filling in the "human_resource" and the "hours" field, multiply the "hourly_cost" value by the "hours" value and insert the result in "imputed_quote".
The "imputed_quote" field should however also be editable manually after the automatic compilation.
Can someone help me?
THANK YOU!
Fabiano
I have a "budget" table with a "human_resource" field, a "hours" field, a "hourly_cost" field and a "allocated_quote" field
The "human_resource" field and the "hourly_cost" field are lookup fields that point to the "name" and "h_cost" fields of the "human_resources" table respectively. In the "budget" table the "hourly_cost" field is filled in automatically when the "human_resource" field is selected.
I would like to create a javascript code for the "budget" table which, after filling in the "human_resource" and the "hours" field, multiply the "hourly_cost" value by the "hours" value and insert the result in "imputed_quote".
The "imputed_quote" field should however also be editable manually after the automatic compilation.
Can someone help me?
THANK YOU!
Fabiano