Business Rule Info Object

   MaestroThe UI design product.  |   Form Builder |  All versions This feature is related to all versions.

A Maestro business rule JavaScript requires an info object parameter, passed to it on its invocation, to perform a desired action.

The info parameter is an object describing the event which triggered the rule, or it can be the object returned from a success or failure call in a remote data handler. The value of the info object strongly depends on the rule's implementation. For most rules, the returned info object is undefined.

The info object can be described with the following structure:

info = {
	widgetTypes: {},
	images: [],	
	fonts: [],	
	scripts: [],	
	styleImages: [],
	ruleScripts: {},	
	extraHtml: {},	
	formView: formView

A Form Builder can always check the values of the info object in JavaScript by:

  1. Adding debugger; line in the JavaScript code
    info object
    console.log("first name is ");		
  3. Building with Options.
  4. Navigating the form's property in the Browser with debugging on.
  5. Viewing values in the debugger (displayed in the screenshot below).

The screenshot below shows the 'info' parameter expanded in the developer tools console. This event has been triggered by Angular code, which is the framework Maestro forms run within.

The screenshot below shows the info object returned from a dynamic data call. The returned data in this particular case is an array of country names and codes, but it could be anything, depending on the dynamic data service it invoked.

Next, learn about business rule data object.