Posts

Showing posts from April, 2018

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