Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

109
Visualizações
Calling a function inside Code.gs in Google App Script?

Basically, I have a javaScript.html file enclosed with a script tag that is embedded to my Index.html using <'?!= include('javaScript'); ?> without the " ' " before the <.

What I am trying to do is call function globalVariables, located on my Code.gs, inside my javaScript.html but whenever I want to access isEditor's value, I always get an error of "Uncaught ReferenceError: globalVariables is not defined"

Code I want to access in Code.gs

function globalVariables(){ 
var varArray = {
 //Other items here                             
isEditor: true                                             
};
return varArray;
}

Code in my javaScript.html that needs to access globalVariables

  function createTable(dataArray) {
     
     google.script.run.globalVariables();

     var data = globalVariables().varArray[6].value;

     var isEditor = data;


 if(isEditor == true){
  //other code here
almost 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda