Add Grab Files to a Form
    • 26 Jun 2024
    • 3 Minutes to read
    • Contributors
    • PDF

    Add Grab Files to a Form

    • PDF

    Article summary

    A grab file is created when data is processed by the Lasernet Service. The grab file represents a unique copy of all the data contained in an invoice or any another kind of report.

    For text input data, the variable fields are typically structured in rows and columns making it possible to quickly identify their position within the grab file. Because in this scenario the grab file is an ASCII file, it can be opened in Microsoft Notepad or Lasernet Grab Editor.

    In the example above, the grab file contains invoice data. The header of the file contains the customer name and address followed by the fields: Supplier, Vat NO. and Buyer. The body of the file contains invoice lines; each line specifies a product number, product text and price per item. The footer contains total price, payment terms etc.

    Select a Grab File

    Before you can set up a new form, a grab file needs to be opened in the left window of the Lasernet Developer. Information about how to generate grab files is available in the manual for the Lasernet Developer (in the Grab chapter).

    Click the Form > Select Grab File menu item and browse to the directory on your computer, where the relevant grab file is located. This is usually the Grab subdirectory of your configuration.

    When you have located the correct grab file, press the Open button and it is displayed in the left-hand window of the Lasernet Form Editor. You can open several grab files simultaneously by clicking them with the Shift or Ctrl key pressed. They are displayed as tabs in the left-hand pane of the Form Editor window.

    Note

    XML data is represented in a tree structure with nodes identifying the variables and containing the actual data. From the View menu, you can switch the XML input view between Full XML, XML without end tags and XML as Table.

    You can download the last saved grab file, that belongs to the open form, from the server using the F12 key. When using this functionality, you must be able to connect to a Lasernet server listed in the main configuration.

    If more than one server is available, you will be prompted to choose which of the servers you want to download the grab file from. When a grab file has been downloaded, it is deleted from the directory containing the grab files on the server.

    If no new grab files exists for the current form, you will receive a warning that no grab files are available for the current form on the server.

    If the grab file found is older than the currently open one in the selected grab tab, it can be downloaded and replaced in the current tab or opened in a new tab.

    You can also click the button to select the last grab file from server for the open form, or select a specific grab file for one of the already loaded grab files.

    You can also load an additional grab file (.lnjob). This is an additional setting that must be activated when configuring the grab mode. The grab file contains the following information:

    • JobData (.grab): Contents of the JobInfo ‘JobData’. No JobInfos are available.

    • JobInfos (.lnjob): Full Job including all JobInfos.

    For your convenience, there is also an option to drag and drop a file from Windows Explorer or equivalent file manager.

    View Grab JobInfos

    To view the Grab JobInfos, activate View > Grab JobInfos (Ctrl+Shift+G).

    If a JobInfo grab file (.lnjob) does not exist, the JobInfos view only shows the system JobInfos generated by the Form Editor.

    The JobInfo view contains a Pre tab and a Post tab. The Pre tab shows the loaded JobInfos and the Post tab shows the result of JobInfos created by the system and by the user in the current sheet.

    You can Add and Remove JobInfo from the list for testing purposes, Save the result into the grab file or Rollback the changes added to the list. You can only Rollback until the last Save event.

    Working with a JobInfo grab file allows you to use the values of grabbed JobInfos during form design. This is a powerful feature when testing scripts, modifiers and database commands that retrieve and change the value of JobInfos. The result of the JobInfos will often have an effect on the final design. It will also show the result of the design when processed through the Form Engine on the Lasernet Server.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.