Scripting App Behavior


The low code approach to app creation has been very effective at decreasing the complexity and learning-curve associated with building custom apps in response to quickly changing business requirements. Low code tools do the heavy lifting for developers and system administrators, freeing them to focus on business needs and rules rather than writing complex code.

To be truly successful, any low code approach must still include the ability to configure sophisticated app behavior in response to user input. This can be a challenge to implement with visual tools.

Altova RecordsManager offers a low code approach to creating database apps, with a built-in scripting editor that is purely visual. This offers the best of both worlds: easy app creation and sophisticated functionality customized for data-centric applications. Let’s see how it works.

People working on computers in an office

Database Apps: Responding to User Input

RecordsManager accelerates the creation of database driven apps by removing the need for backend database development and manual coding. This approach makes app creation accessible to a wider range of users, since specific app development experience is no longer required to build an effective solution.

In a database app, users typically interact with the solution by searching for, reviewing, adding, and editing data, whether the app is for reviewing restaurants, managing inventory, tracking contracts, or any other data-driven function.

In addition to enabling searching for and editing data, it’s important for the app to be able to react to changes made by users .

RecordsManager lets app creators configure this behavior during the definition of data entry forms. Defining data entry forms in RecordsManager is a completely visual process. It’s easy to select fields, configure layout and styling options, create tables, and control how data is presented to the end user. Similarly, scripting app behavior using RecordsManager is accomplished with a visual editor.

In reaction to app user behavior, scripts can be used to:

  • Update or modify other fields of a record
  • Trigger creation, modification, or deletion of child records
  • Execute an action, such as sending emails
  • Show the user a message (standard, warning, error)
  • Save records

Scripted behavior can be configured to trigger in various circumstances:

  • When a record is saved
  • When any field is modified
  • When a specific field is modified
  • When a child record changes (a script in the parent record can change data therein)
  • When a user taps a button (i.e., a script behind a button)

For instance, in the script below for an enterprise contract management app, some changes require review and approval. When the record is saved by an end user, an email notification (defined in a previously configured email form) is sent to certain users and user groups. The Description field of the record is updated with the name of the user who made the changes. These actions will happen automatically behind the scenes when a user saves the record.

Scripting to define app behavior

The scripting editor uses easy buttons, menus, and standard XPath to define behavior. RecordsManager guides the app administrator through script definition with pre-populated menus and choices at each step of the way.

Visual scripting editor

Complex scripted behavior can be defined using if / then / else branches. For each case (true and false), the script will carry out, as appropriate, any of the actions available for that type of script. Below is a fairly simple branch definition on a Paralegal Data Entry form. If a user selects Review as the Process Status, when the form is saved, the Status field will be automatically updated with a value of Pending and a reminder email to review the record will be sent to the specified user.

Creating a script with if/then/else branches

Here is a more complex script, with multiple if/then/else conditions that define what happens when new records are saved in the contract management app. This essentially defines part of a complete workflow approval process for open source software (OSS) license agreements as well as XBRL Taxonomies tracked by the app, with different approval stages for the CTO and General Counsel, including the ability to respond to and follow up on clarification requests:

Complex scripting in a database app

This script has been defined in a completely visual manner, using point and click and intelligent menus that walk the administrator through defining app behavior triggered by each condition.

The visual scripting editor is a great tool to add sophisticated functionality to your database apps – without learning to write complicated code.

Try RecordsManager for Free

Altova RecordsManager is a free, pre-built MobileTogether solution that is available for you to start using when you install MobileTogether Designer. Download and install the free Altova MobileTogether Designer to get started on your first RecordsManager app.

Tags: , ,