Trying to set the value of a field with a button that runs a script that gets the average of four fields rounded up to the next integer. I have tried a several ways but have been unsuccessful. The script window each of the fields to be added together show the correct values when hovering over them. Below are the last 2 ways I have been trying, screen captures of the form and button properties.
SCRIPT Version #1
crit_organization_conglamorated_id.setValue.math.ceil((crit_organization_functionality_id.value + crit_organization_financial_id.value + crit_organization_revenue_gen_id.value + crit_organization_reputation_id.value) /4 )
SCRIPT Version #2
let (val);
((crit_organization_functionality_id.value + crit_organization_financial_id.value + crit_organization_revenue_gen_id.value + crit_organization_reputation_id.value) /4 )
crit_organization_conglamorated_id.setValue(val)
BUTTON PROPERTIES AND SCRIPT
FIELDS TO AVERAGE Note the actual value of each field is the integer that is shown in the displayed label
FIELD TO POPULATE
I'm certain there is something simple I am missing but after 2 days of trying to figure this out and searching online for the solution I need help!
-
Goal:
-
Steps:
-
Details:
-
Screenshots: