Generic application – Step 6 – Database of registrations, recipes, etc…
We will show how to add entries in separate databases, for example, products, recipes, status, companies, customers, alarms, etc …
(Previous step – Step 5 – Alarm Bank )
For example, we will register products with configurations, in this case with the maximum and minimum tags associated with the product. When selecting the product in this case, it will also set the maximum and minimum tags associated with it.
We will put on the screen a combo for the user to select the product and associate it with the Product text tag. Select the combo object in the bar, place it on the panel, associate it with the Product tag, and in its properties place a bank, in this case, “PRODUCT1.LB”. The DatabaseList property leaves empty. And in the return property, “all fields”, like this:
Then, we will create the product bank with the associated highs and lows. Click the Bank, New button and in this case type PRODUCT1.LB.
Define the database fields. In this case Product, TagMaximum and TagMinimum. If you leave it with the same names as the tags, then the combo will understand that the field values should be passed to the actual tags.
The Product field, leave the type Text, 63 characters. TagMaximum and TagMinimum in number format, like this:
Click on OK.
Then select the PRODUCT1.LB bank. Click the Edit button. For example, add three records for testing. Click the + button and enter the data in the records like this:
Run the application to test.
First go to the General screen.
Then select a machine.
Then, click on the product combo and select one of the products.
The value of the product should change, and also the maximum and minimum values like this: