Obviously I am clueless at scripting. Just trying to fire a manual script by the sheet's current user - obtains their Goggle User Email and then will hide or show certain columns. I am lost and have no idea what I am doing, as you can tell. Any help would be so very appreciated. Firing script manually by logged in user via script embedded image on Sheet that is clicked after opening sheet.
function onChoice(e){ var email = (Session.getEffectiveUser().getEmail()); var sheet = e.source.getActiveSheet(); if (e.user() !== 'email') return; switch (e.value) { case '[email protected]': sheet.showColumns(1, sheet.getMaxColumns() - 1) break; case '[email protected]': sheet.showColumns(5, 2) sheet.hideColumns(7, 6) break; case '[email protected]': sheet.showColumns(7, 6) sheet.hideColumns(5, 2) break; } }