Friday, October 29, 2021

Enhancements to the Actions Editor in Orbeon Forms 2021.1

The Actions Editor in Form Builder allows you, as a form author, to run services. Services are of 2 types: HTTP services (to call web services or REST services) and database services (to run SQL on your relational database). In the Actions Editor, you define: when those services run (e.g. form load, value change, user clicking on a button…), what the input of the service, and what to do with what is returned by the service (e.g. populate fields, dropdowns).

In Orbeon Forms 2021.1, we've made 2 enhancements to the Actions Editor:

  1. You can now provide a formula which defines whether the action must run. Say you have a form that is used within your company, have in your form a service loading information about the current employee, and you may or may not know what the employee id of the current user is. The following screenshot illustrates how you can handle such a case by providing a formula for "Run condition".

  2. You define the values to pass to the service in the Service Request Actions tab. Typically, you will pass the value of a field. You can now also pass a value returned by a formula that you provide. For instance, in the example below we're passing an employee id that we're receiving through an HTTP header to the service.

    You could have done this before by adding a field to your form, using a Calculated Value formula on the field, making that field always hidden, and passing the value of that field in your action, but of course just using that formula in the Actions Editor is simpler and more direct.

No comments:

Post a Comment