Wednesday, 10 May 2021
FrontScript is the eFront language for data processing. With it we will be able to extract data from our databases, both internal to the eFront application and external, and process that data to calculate statistics or generate reports and graphs. It will also allow us to create templates of Word and Excel documents, with which we can print our reports.
It is a procedural language, each program consists of DATA steps and PROC procedure steps. With the DATA steps we will create the tables, which we can filter, add or remove columns or even combine them with other tables. With the PROC steps what we can do is, for example, manipulate the data in the tables or print them on the screen when running the programs.
In addition to the eFront programs, FrontScript includes macros that will be of great help when printing the application data in an external document.
To get a little closer to this language we have the following example:
/* 10-05-2017
—Sample program to order data—
*/
%PARAM ORDER LABEL = “Order (ASC / DESC):” TYPE = STRING;
DATA WORK. TEST;
COLUMN NUMBER;
NUMBER=2;
OUTPUT;
NUMBER=1;
OUTPUT;
NUMBER=3;
OUTPUT;
NUMBER=5;
OUTPUT;
NUMBER=4;
It is a very simple program in which a temporary table is created that has a column and five records, a parameter, a procedure with which the original table will be ordered depending on the parameter and, finally, the procedure with which we print the table on the screen. This would be the resulting tables according to the parameter:

As we see in the example, in FrontScript all commands must end with a semicolon. And even if everything appears in uppercase, it is not important that the code is written that way, that is, it is indifferent to write in upper or lower case the keywords or the names of the variables, FrontScript will detect the commands anyway. Values are enclosed in either quotation marks or single quotation marks. And if we want to add comments, we will do it using slash-asterisk for those that occupy several lines and double bar for those that only occupy one: /* Comment */ or //Comment.
In the next post, we will see what are the different ways in which we can create tables.
