Dynamic Scripting in Orixa: Adding a Resource to create Rapid-Entry-Grids in your App

Orixa has built in systems for data entry and data management which are reasonably easy and intuative. However where large quantities of data are being managed, it is frequently much more economical to write systems for rapid-data entry. These save staff a lot of time, and save management a lot of money, as they allow hundreds or thousands of data-rows to be posted into the system database in an automated or semi-automated manner.
If you have your own Custom Orixa App (built by Orixa engineers) these types of features can be added to your App to meet any requirement. It is also possible to add rapid entry systems yourself, by adding Resources to your App. This is a technically complex process, but can be done by any User of an Orixa system if they have a high enough Security Level and understand the required steps.

When to use a Rapid Entry Grid Resource

When many rows of data are being processed by users with relatively minimal interaction: For example reviewing data imported from another Application such as Excel, prior to posting it into your App.

When you wish to post updates into multiple BusinessObjects simultaneously from a single user action. Most data-entry in Orixa occurs at the "Record" level (for example "Farmer" or "Customer"). If have data for a Farmer, coupled with data for their agricultural production, or data for a Customer combined with data of their orders it may be very time-consuming for staff to manually key all this data into your system. A rapid entry grid can automate this process, and add it to your App with a few key-presses. 

An Example of a Rapid Entry Grid Resource

 

Rapid Entry Grid Resource  

  1. Rapid Entry Grids appear in the "System", "Entity" or individual record "Edit-Form" Action-menu's .

Rapid Entry Grid in Use  

As soon as the Action is clicked, a data-grid form will open. The content of the data in this grid is set by the programming of the Resource

  1. The user can edit and update individual items of data in the grid, correcting and checking it as necessary.
  2. Once all rows in the grid have been checked, the user can click "Post", doing this triggers the pascal script which can undertake any database actions decided on by the Developer.
  3. If a row in the grid is linked to a record in the database, a "Show XXX Record" button will appear in the rapid entry grid window. Clicking this opens the record linked to the currently selected row.
  4. If a user has a high enough Security Level a button appears on the grid allowing them to edit the pascal script.

Editing the Pascal Scrpt of a Rapid Entry Grid  

  1. Click the "Edit Post Script" button. The Script Editing Window will appear showing the script that will run when the user clicks the "Post" button.
  2. The Developer can click the "Test" button to compile the script. This checks that the script does not contain any syntax errors, and will run when the user clicks the "Post" button of the grid. If the script contains errors the compiler will return a message which should help to identify the error.
  3. The Save button allows any changes made by the Developer to be recorded in the database, saving the script to the "ObjectProperties" field of the Resource which generates the grid.
  4. The Close button closes the window and returns the user to the data-entry-grid screen.

 

A fuller tutorial about writing pascal-scripts in the script-editing-window is included here:

Introduction to Pascal Scripting in Orixa

Creating a Resource which is a Rapid Entry Grid

First create a Resource following the steps shown here:
 Using the "Resources" system-table to create reports, charts, data-cubes and dashboards

Then reset the "ComponentID" of the record to "Rapid Entry Grid"

Rapid Entry Grid Resource Record  

  1. Newly created resource with ComponentID = "Rapid Entry Grid", note that as the "LocationID" of this Resource is set to "Entity" it will appear in the Actions-menu of the WorkItems Entity on the System Entities screen.
  2. The "Name" of the resource will be used to set the text used in the Actions-menu and the Caption of the ddata-grid window.
  3. The SQL code for the resource will be used to populate the grid.

Viewing the Pascal Script that runs when the "Post" button is clicked by the user

Access the "ObjectProperties" of the Resource  

The Pascal Script is stored in the "ObjectProperties" of the resource. Access this from the Actions menu of the Resources Edit Form. Details of how to write Pascal Scripts are covered in the Advance Developer sections of this help. For more information please refer there.