- Form Designers
- Rules and Rule Designer
Custom control methods can now be executed in Runtime. Execute Control Method Actions have been added to the Control Interaction section of the Rule Designer to provide the ability to execute custom control methods in Runtime. The Save As PDF control and Content control also contains methods that can be used with these Actions.
Properties can be set before the method of the control executes, and mapped after the method has executed. This allows a combination of the controls properties and/or the method parameters to be used in the control’s method.
The following execute control method Actions are available in the Rule Designer:
By selecting the Execute a control's method Action for example, the custom control can be selected and the methods available for that control will be listed as shown below.
By clicking on configure next to the method, the properties of the control can be set prior to method execution and retrieved after execution. In the example below, the values of text 1 and text 2 will be concatenated in runtime. In addition, the value of one control's property can be transferred to another control's property if the properties are the same.
Next, the Output Mappings can be configured if the control has a return method. Click Next or click on the Output Mappings step at the top. Map the field to the control where the result should be displayed.
In the scenario below we will be using the Save As PDF control to save a Form with Tabs as a PDF document. Follow the steps below to set up the scenario:
- Create a custom PDF SmartObject with the following properties. This SmartObject will be used as the data source where the PDF will be saved:
- ID – Autonumber
- PDFFile – File
- Notes - Text
- Create a List View of the PDF SmartObject, called PDF List.
- We created a Form with two Tabs called Customer and Region. The Customer Tab contains the Customer Item View and the Customer List View. The Region Tab contains the Region List View.
- Add a Button control to the Form and call it Save PDF.
- Add the Save as PDF control to the Form.
- Click on the Save as PDF control, click on the ellipsis next to SmartObject in the Data Source section and select the custom PDF SmartObject created previously.
- Configure the Page Size and Page Orientation in the Properties pane.
- Go to the Rules to set up the following Rule. The Save as PDF control contains a method called Save PDF. Select the method.
Event: When a control on the Form raises an event.
Action: Execute a control's method
- Click Finish to save the Rule and Finish to save the Form.
- Run the Form.
- Capture some data and click on the Save PDF button.
- Run the PDF List View.
- The PDF item is listed. Click on the link to open the item.
- The PDF document is opened and the Form is displayed. Each tab is listed on its own page.