
Anonymous Community User asked a question.
What's wrong with this formula (multiple if's)?
Good evening, I've been trying to have a calculation give a result depending of which options a user selects (A, B, C or a combination). However, the below formula gives the following error message: "Script error: TypeError: cannot read property 'sort' of null" Could someone help out :)? Thanks a lot, Alex if (@Activation == "A") { 10000 } else if (@Activation == "B") { 5000 } else if(@Activation == "C") { 10000 } else if (@Activation.sort().join() == "A,B") { 15000 } else if (@Activation.sort().join() == "A,C") { 20000 } else if (@Activation.sort().join() == "B,C") { Wrong } else if (@Activation.sort().join() == "A,B,C") { 25000 } else {0}