This error message is coming up after trying to complete the following division equation to create a Percentage (which is formatted to percentage with two decimals):
Openended/(Closedended+Openended) in a simplified field notation.
I have tried multiple custom calculation scripts that create a null or 0 or blank field because the Openended and Closedended both are formatted to number; however, I continue to get the same error message.
You can use this as "Custom Format Script" of both Openended and Closedended fields:
AFNumber_Format(2, 0, 0, 0, "", true);
I have come to realize this error message is also connected to when I create additional fields for other percentages using the same equation with different field names; somehow they are linking together.
(Openended/(Closedended+Openended) = Percentage of Awareness Questions
(OpenendedAn/(ClosedendedAn+OpenendedAn) = Percentage of Analysis Questions.
If I only calculate the Percentage of Awareness Questions this error message will still pop-up but only if I delete/clear information in the Opendened or Closedended fields.
As soon as I create the Percentage of Analysis Questions field and try to complete the calculation. This error message comes up twice:
- The value entered does not match the format of the field [ Percentage of Awareness Questions ]
- The value entered does not match the format of the field [ Percentage of Analysis Questions ]
Any help would be greatly appreciated. My initial assumption is a "custom calculation script" is necessary, given that the error is occurring even using the "custom format script"
Try use this code in your percentage fields as "Custom format script":
event.value = util.printf("%,0.2f%",event.value);
Thank you that worked! I actually only needed to use this "custom format script" for the percentage and did not have to use the previous "custom format script" for the numbers.
You will get the message when you divide by zero.