Advanced sample scripts
Creating a good script takes time and knowledge. In this section, I will show how a real script is put together in a real scenario for your reference. It is good to describe functions and best practices, but I believe showing everything come together in an example is even more valuable.
The following code example will show you in a very simple way how to:
- Split your code into different sections
- Create a simple stats table
- Check if your source file exists and create one if it doesn't use control statements
- Apply section access to the application
The sample script is split into sections that you can create in Script Editor.
For the script to work, you need to create a Create a new Connection
in one Folder
called Environment
and another called Source
.
In the Environment
location, create a text file called Environment.txt
with the following line of code in it:
SET vEnvironment=Live;
In the Source folder, create an Excel file called SectionAccess.xlsx
with two columns, ACCESS
, and...