Very new to this so appreciate the assistance!
My form has three subtotal fields
If the MGMT POINTS field is 0, would like the C_M field to be 0.
If the MGMT POINTS field has a value, would like the C_M field to reflect COREPOINTS + MGMTPOINTS.
Is there a space between "MGMT" and "POINTS", or not?
Apologizes - typo on my part! Thank you..
Subtotal Field 1 named COREPOINTS
Subtotal Field 2 named MGMTPOINTS
Subtotal Field 3 named C_MPOINTS
If the MGMTPOINTS field is 0, would like the C_M field to be 0.
If the MGMTPOINTS field has a value, would like the C_M field to reflect the total of COREPOINTS + MGMTPOINTS.
As the custom calculation script of "C_M" (or "C_MPOINTS"... Again, you've used both names), enter the following:
var v1 = Number(this.getField("MGMTPOINTS").valueAsString);
var v2 = Number(this.getField("COREPOINTS ").valueAsString);
event.value = (v1==0) ? 0 : v1+v2;
Thank you! Sadly it didn't work .. am I doing something wrong?
Yes, you've not placed it under the correct location. Read my reply more carefully, please.
Thank you .. it works!! I am very appreciative!!
Reason I asked you in other post, what do you want if MGMT field is blank, because this type of code will show 0 in C_M when MGMT is 0 but it will also show 0 in C_M if MGMT is blank,if it doesn't bother you that way thats ok, but i think it would be better to make C_M blank when MGMT is blank.
Also this will just replicate whatever number is in MGMT field,you should make it to not show calculation until both fields have values.