Using linux environment variables

kclark
kclark E
edited February 11, 2022 in Analytics #1
A lot of Linux users have grown to love environment variables, they make coding faster with less keystrokes. The following code will show you how to call $HOME and display it in lblPath.
importPackage(Packages.java.lang);
temp = System.getenv("HOME");
reportContext.getDesignHandle().findElement("lblPath").text = temp
<br />
There are two things to remember. Packages.java.lang is required and the leading $ for your environment variable is not required for System.getenv().
Warning No formatter is installed for the format ipb