Script breaks after the second if statement -
i trying format email confirmation registration form. if choose class filled should produce else statement otherwise show value click on in form. works first if statement when add second statement no longer gives me else statement if class full.
if (s1 = sheet.getrange("a6").getvalue() && sessiononeload6 <= 15){ var sessionone = e.values[4]; } else { var sessionone = "this section full, please return enrichment registration form (link) , choose new section."; } if (s1 = sheet.getrange("a7").getvalue() && sessiononeload7 <= 15){ var sessionone = e.values[4]; } else { var sessionone = "this section full, please return enrichment registration form (link) , choose new section."; }
you using =
test equivalence in fact assigning right hand side s1
.
use ==
test value equivalence or ===
type , value equivalence instead. leave original value of s1 intact both conditionals.
Comments
Post a Comment