Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda