Skip to main content

Add New Form with Criteria - Knowledgebase / Lasernet / Lasernet Training / Lasernet Form Editor 9 - Designing Forms - Formpipe Support Portal

Add New Form with Criteria

Authors list


In this exercise, you can learn how to add a new form and design a report by using XML as input data. You are also to set up the required criterion/criteria to recognize the form.

The form criterion is used by the Form Engine to look for the key data in specific locations in the input data and recognize a form in the form list.

If no criteria are specified for a form, such a form is not processed.

Exercise

Download and import the attached configuration called 02. Add New Form with Criteria in Lasernet Developer 9. Afterwards, follow the steps listed below:.

1. On the Tools panel, click Forms to open a form area.

2. Click the Add button on the top toolbar.

3. Otherwise, you can drag the Form item to the form area.

4. As one more alternative, you can right-click in the form area, and then click Add in the context menu that appears.

5. Enter a name of the new form in the Name field.

6. Select XML as an input format.

7. Select EMF as an output format. Once you are done, click Ok to confirm changes.

8. Click the Thumbnails button to toggle viewing thumbnails or a list of forms.

9. Double-click the form named Sample to enter the design mode.

Before you can set up a new form, a you are to open a grab file which shows in the input view window of Lasernet Form Editor. A grab file contains the output data as delivered from the application for which you want to create a report.

10. On the Form menu, click Select Grab File(s).

Browse for the directory on your computer where the relevant grab file is located. This is most likely the Grab subdirectory of your configuration.

11. Select the Sample.xml file located in the Sample folder, and then click Open.

You can set up a criterion in the input of Lasernet Form Editor by using the Criterion tool and selecting an XPath. You can also manually add a criterion with the help of the Criteria dialog. You can access this function by clicking Criteria on the Form menu.

12. On the Developer toolbar, select the Criterion tool to set up the first criterion. You can use one or several criteria, so the Form Engine can recognize and process a form.

13. Move the cursor to the <FirstCriterion> element and select the element itself or its value.

14. Accept the default settings for selected XPath which is Report/FirstCriterion as well as the match value which is Sample. From the Operators drop-down box, you can select an operator needed to match a value. In this example, the contains operator is used.

15. Repeat step 10 – 12. Select <SecondCriterion> which contains the Lasernet value.

16. Repeat step 10 – 12. Select <ThirdCriterion> and set the equal operator to match the 7 value.

17. The input view shows three objects which are dark-grey highlighted illustrating that the form contains three criteria to recognize the XML data.

18. To edit the criteria, on the Form menu, click Criteria. Each criterion has name defined by a letter which is used for a form expression. You can manually add new form criteria, edit the existing list, or manipulating items available in the list by moving each up/down. Ensure that the form expressions are listed in the expected order after moving a criterion up or down.



Helpful Unhelpful

2 of 2 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share