In this tutorial, a Multiple Rows Form will be developed using the order_details table and the following additional resources:
- Numeric fields using Spin.
Creating a Multiple Rows Form
Note:In case you have any doubt of how to create a form, access here: Creating a new form
1. Create a new Form, select the Multiple Rows option, and select the example table order_details.
2. Now, in case you want to edit the label of your fields click on the Edit Fields tab and change the name of the fields as in the image below
Editing Multiple Record Form fields
1. First, access the application menu and select the “Field Positioning” tab.
2. Remove all the fields, except: “productid”, “unitprice”, “quantity” and “totalprice” as displayed below.
3. Access the app menu in “Fields” and select the field “productid”.
4. Navigate to the “General Settings” section and disable the “Use Select2” option.
5. Navigate to the “Lookup Settings” and substitute the SQL code by the SQL below:
SELECT productid, productname FROM products ORDER BY productname
6. Select the field “unitprice”
7. Navigate to the section “Values format”, activate the option “Currency symbol usage”, change “Decimal precision” to “2” and activate the option “Show a calculator” as in the image below.
8. Select the field “quantity”
9. Navigate to “Values format” and activate the option “Use Spin”, as in the image below.
10. Select the field “totalprice”
11. Navigate to the “Values format” and activate the “Currency symbol usage” option.
12. Select the button “Run Application” in the toolbar to generate and execute the Form.
After that, your form will be as the image below
To check more examples using Scriptcase, access: Samples: Complete Systems and Applications with Scriptcase.
Comment this post