How To: Use environment variables in BOARD Procedures - Export, Extract and Datareader actions

Document created by mik1893 Employee on Jul 13, 2017Last modified by ggallo on Dec 21, 2017
Version 3Show Document
  • View in full screen mode

The use of environment variables allows to create procedures where the path for the Export, Extract or Datareader actions is not hard-coded but varies depending on the environment.

 

A typical example is the case where a BOARD application needs to be moved from an environment where the BOARD drive is C:\ to another one where the drive is D:\ 

By "BOARD drive" we don't mean where the BOARD Software has been installed (usually the C:\ drive), but we mean the path defined in the Server configuration for storing Capsules/Databases/Dataset and all other folders used by the BOARD Server to browse information

A Windows environment variable can be used

  1. in the path definition of an ASCII protocol Datarader action
  2. in the path of the Extract action
  3. in the path of the Export, Broadcast or Refresh Office report action

 

Example of use in the path definition of a Datarader action (for reading a text file) :

 

  

Example of use in the path of the Xtract action :


 

  

Example of use in the path of the Export, Broadcast or Refresh Office report action :

 

  

EXAMPLE for ENVIRONMENT VARIABLES
Let's consider the case mentioned above: you are building an application in an environment where the Board path is C:\Board but the application will need to be deployed to a production server where the Board path will have to be on the D:\ drive.

 

1) create an environment variable in Windows (see instructions below on how to create a Windows environment variable); you can name it BoardDataset and use it to identify the current Dataset folder path (which might be located in C:\Board\Dataset)

2) review your BOARD Procedures and replace any hard-coded path, using the Windows environment variable, in all your Extract, Export or Datareader actions.
   For example replace 

 c:\Board\Dataset\Abc123\Filename.txt 
with 
%BoardDataset%\Abc123\filename.txt

3) once the application has been deployed to the new server, change the value of the environment variable to D:\Board

 

 

HOW TO  DEFINE WINDOWS ENVIRONMENT VARIABLES
An environment variable is a Windows settings, which you can view or configure as shown here under:


Open your computer's System Properties, go to to the Advanced tab and click Environment Variables.


After creating or modifying a Windows environment variable you must restart the BOARD service and the BOARD client for changes to take effect.

 

12 people found this helpful

Attachments

    Outcomes