Copy link to clipboard
Copied
I have 3 textboxes(tb) ("MandatoryTotalLodge01", "L1Lodge01MajorTotal" and "L1Lodge01BasicTotal")with calculated sums.If a condition in each field meets its criteria, a fourth textbox(target"CSComplete01") shows 1 message("Cornerstone Complete"), if ALL do not meet, it shows another ("Still Working"). The following is what I have in the the custom calculation of the target tb. I strongly feel its puncuation.
Any helpers?
if (this.getField(“MandatoryTotalLodge01”).value>= 1) && if(this.getField(“L1Lodge01MajorTotal”)>= 1)&& if(this.getField(“L1Lodge01BasicTotal”).value>= 1 );
{
event.value=this.getField("CSComplete01").value = "Cornerstone Complete";
}
Copy link to clipboard
Copied
You got that error because you didn't use correct quotes.
“MandatoryTotalLodge01”
"Cornerstone Complete"
The green ones are correct, but you also have other errors in your script.
Try to use this as custom calculation script of "CSComplete01" field:
var f1 = Number(this.getField("MandatoryTotalLodge01").valueAsString);
var f2 = Number(this.getField("L1Lodge01MajorTotal").valueAsString);
var f3 = Number(this.getField("L1Lodge01BasicTotal").valueAsString);
if(f1&&f2&&f3){
if(f1>=1 && f2>=1 && f3>=1)
event.value = "Cornerstone Complete";
else
event.value = "Still Working";}
else
event.value = "";
Copy link to clipboard
Copied
I inserted a ".value" after my "if(this.getField(“L1Lodge01MajorTotal”)>= 1)"
The error reads:
"Syntax Error: illegal character
1: at line 2
Copy link to clipboard
Copied
You got that error because you didn't use correct quotes.
“MandatoryTotalLodge01”
"Cornerstone Complete"
The green ones are correct, but you also have other errors in your script.
Try to use this as custom calculation script of "CSComplete01" field:
var f1 = Number(this.getField("MandatoryTotalLodge01").valueAsString);
var f2 = Number(this.getField("L1Lodge01MajorTotal").valueAsString);
var f3 = Number(this.getField("L1Lodge01BasicTotal").valueAsString);
if(f1&&f2&&f3){
if(f1>=1 && f2>=1 && f3>=1)
event.value = "Cornerstone Complete";
else
event.value = "Still Working";}
else
event.value = "";
Copy link to clipboard
Copied
Thank you VERY VERY much Nesa!! This got me out of a big jam.