Code View

   MaestroPreviously known as Transact Maestro.  |   Form Builder | |   21.05 This feature was updated in 21.05.

The Maestro editor comes with the Code View functionality, which allows you to view, create, remove and modify business rules that a Maestro form may require.

To view business rules associated to form's components in the Code View pane:

  1. Open a form in the Maestro editor and click Code.
  2. code view structure tree

  3. Select the Structure tab to view the components and associated rules in a tree view.
  4. Type a component label or rule type in the Search field to look for a rule that was configured for the selected form. It does not search through the actual code, it only looks at the content visible in the design tree.
  5. Select the Only show items with rules checkbox to see components with rules only. This significantly reduces the number of components to looking through.
  6. Select the Include Inherited checkbox to see rules that are inherited based on the components default options or rules from a template.
  7. Open the Form Options category to see more context from the category name and allows you to easily find the rule in the Form Options dialog as well.  |  21.05 This feature was introduced in 21.05.
  8. Select a rule in the tree to view the source code of the rule in the editor so you can edit it directly or create new rules by right-clicking any component in the displaying pane. You can also edit the rule directly in the code editor, or right-click the component to use any of the code assist options to edit the selected rule. Select Add New Rule to create a new rule for a selected component and choose a rule you want to create in the Create Rule window. For more information, see add a new rule in Code View.
  9. Right-click a selected rule and select Delete Rule to remove it.
  10. Click Move Rules to JS File to move the selected rules to an external JavaScript file for use in external source code management tools, for example Git. For more information, see move rules to JS file..
  11. Select the Search tab to search based on script content. This allows you to filter based on the content within the code, so it doesn't look at the component label or rule name, but rather at the code within the rule. The search results show all methods that match the search criteria, including lines within the method that match the search criteria.
  12. code view with search code option

  13. Select the Match Case checkbox to filter the search results to only show those that match exactly according to the case structure used in the original search.
  14. Select the Regular Expression checkbox to filter the search results to only show regular expressions.
  15. Select the Include Inherited checkbox to filter the search results to include any inheritance that exists in the rules.

You can use the following resources from the Code View to create rules:

  • API Methods Reference - it contains information on API methods published for use in Maestro business rule functions.
  • Maestro Rule Functions - these rule functions can be created in the Code View or in the rule editor window accessed from the Rules section of the Properties pane.

Next, learn how to add a new rule.