Posts

Showing posts from 2018

Vue.js with Google Apps Script Web Services

Image
Hi Apps Script Developer, Today,  I am sharing how to implement Vue.js framework with Google Apps Script Web Services. First, you need to copy Vue.js CDN link from Vue.org site there are two links one for the Development environment and another is for Production. For Development I am using Developer links it gives more error and warring descriptions. < script src = "https://cdn.jsdelivr.net/npm/vue/dist/vue.js" > </ script > Create Apps Script web app " Responsive Web Apps using Google Apps Script "  Add Script tag in JavaScript.html file after Jquery framework link. Save it In this example, I am fetching Server site Country Array list and Generating dropdown using Vue.js Vuejs Code File link Vuejs Exec Link  Performance Comparison(performance may vary from device to device) Using Vuejs : Scripting time=626.9ms Using Jquery : Scripting time=677.9ms Happy Coding... .COM at Rs.999 For 2 years

Responsive Web Apps using Google Apps Script

Image
Hi Apps Script developer's, Google apps Script allows to develop Dynamic and Static Web applications like fetch data from Google Sheet and create dynamic cards, intelligent data entry form, Workflows, Help Desk, etc. When you create Web apps using Google Apps Script, it will  not be responsive . You can make applications responsive using third party framework like Bootstrap , Material design or other HTML responsive framework. In this post I am explaining how to create responsive(Using Bootstrap 4.0) Google Apps Script Web application from scratch *Required Basic HTML & responsive framework knowledge  Go to your Google Drive Open Google Apps Script Editor   Create new blank apps script Project & save it Add 3 more Html files Index.html, JavaScript.html & Stylesheet.html with given code For any Web application it requires 4 main components(I am explaining best practise here, you can add HTML, JS & Stylesheet in to two files if you want) For code files

Google Apps Script Integration with Version control tool Bitbucket

Image
What is version control tools? Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made , developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimising disruption to all team members. Top version control tools for system:  Bitbucket  (Unlimited private and public repository)-- Currently I am using Github (free to create public repository) How to create/register account on Bitbucket Sign Up  Bitbucket It will check entered email Id, if it is correct it will ask User name and Password for Bitucket account. Check on I'm not robot option. Click on Continue, It will show next window " Verify your email " Bitbucket team will sent email on your given Id login your email, check email from  Atlassian (<noreply

Google Apps Script Exception Handling

Image
Errors In Computer Programming There are three types of common errors in programming: Syntax Errors Runtime Errors Logical Errors i) Syntax Errors Syntax errors, also called parsing errors , occur at compile time in traditional programming languages and at interpret time in Google Apps Script. For example, the following line causes a syntax error because we used Variable name V caps. function errorTest(){ Var num1=100; } Try to Save ( Ctrl+S ) Error log:  Missing ; before statement. (line 47, file "RegEx") When a syntax error occurs in Google Apps Script, IDE don't allow to save the last changes. ii) Runtime Errors Runtime errors, also called exceptions , occur during execution (after compilation/interpretation). For example, the following line causes a runtime error because here the syntax is correct, but at runtime, it is trying to call a function that does not exist. function errorTest2(){ var test=method(); Logger.log(t

Google Apps Script Regular Expressions

Image
RegEx A regular expression, also called a regex , is a method for matching text with patterns. For example, a regular expression can describe the pattern of email addresses, URLs, telephone numbers, employee identification numbers, social security numbers, or credit card numbers. What Is a Regular Expression? A sequence of symbols and characters expressing a string or pattern to be searched for within a longer piece of text. When you search for data in a text, you can use this search pattern to describe what you are searching for. A regular expression can be a single character or a more complicated pattern. Regular expressions can be used to perform all types of text search and text replace operations. Ref Google: For additional instructions and guidelines, see also Guidelines for using regular expressions and RE2 Syntax . Syntax /pattern/modifiers; var patt = /googleAppsScript/i; / googleAppsScript /i  is a regular expression. googleAppsScript   is

Google Apps Script Loops

Loops can execute a block of code a number of times. Loops are handy, If in Google Apps Script you want to run the same code over and over again, use loops. Often this is the case when working with arrays and Google Sheet: Different Kinds of Loops Google Apps Script supports different kinds of loops: for - loops through a block of code a number of times. for/in - loops through the properties of an object. while - loops through a block of code while a specified condition is true. do/while - also loops through a block of code while a specified condition is true. For Loop The for loop is often the tool you will use when you want to create a loop. Syntax for ( statement 1 ; statement 2 ; statement 3 ) {     code block to be executed } Note: Statement 1 is executed before the loop (the code block) starts. Statement 2 defines the condition for running the loop (the code block). Statement 3 is executed each time after the loop (the code bloc

Google Apps Script Conditional Statements

Conditional statements are used to perform different actions based on different conditions. Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this. Google Apps Script will have the following conditional statements: Use if to specify a block of code to be executed, if a specified condition is true Use else to specify a block of code to be executed, if the same condition is false Use else if to specify a new condition to test, if the first condition is false Use switch to specify many alternative blocks of code to be executed if Statement Use the if statement to specify a block of Google Apps Script code to be executed if a condition is true . Syntax if ( condition ) { block of code to be executed if the condition is true; } Example “Check voting age in India” function ifCond() {  try{    var age=18;    if (age >= 18) {