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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -