How to browse linked fields with the new Link Field Box in DB/TextWorks version 16

by Jonathan Jacobsen Friday, August 04, 2017 10:33 AM

Inmagic DB/TextWorks version 16, released in July 2017, provides you with several great new features for data management. This blog post is one of a series providing details of how to take advantage of these new features.

This blog post is about the new ability to browse Link fields in different ways.

A Link field in a textbase is one which links to another field in another textbase. An example would be a database used to track orders, with a Supplier field. Rather than using a validation list of supplier names to choose from with this field, you might instead link it to a separate Suppliers database, where you can track the supplier's name, address, phone number, email address, website, your account rep and their contact info, your account number, etc. All databases should have a unique number / ID field (e.g. in case you have multiple suppliers with the same or similar names) so you may have a RecordID field in your Suppliers database, as an Automatic Number field, containing unique, sequential numbers.

Previously, when you wanted to put data in a Link field you could only browse the field to which it was linked. In the above example, you would most likely link to the RecordID field in the Suppliers database. So in your Orders database, in the Supplier field, you'd have just the Supplier RecordID (e.g. 12345). This is great for ensuring Order records are linked to the correct Supplier, but hard to use to select the right supplier.

With this new feature in DB/TextWorks version 16, you can keep this link to the Supplier's RecordID field, but browse the Supplier Name field (or any other) to select the right supplier for an order record. This is the best of both worlds: it helps preserve data integrity and follows best practices for relational database design, but allows data entry staff to more easily select the correct records.

In our work with DB/TextWorks, such as in our Andornot Library Kit, we've written javascript and added it to Edit forms to facilitate the above: browsing or searching one field in a linked database, but storing a value from a different field. Now, with this new feature, this is built-in to DB/TextWorks without needing additional scripts.

To use this new feature, follow these simple steps:

1. Bring up an Edit form in the Form Designer in your DB/TextWorks database. Select Add > Form Box > Link Field Box (this is a new entry under Add > Form Box).

2. In the Link Field dialogue, select the field to link to and the field to browse. Be sure to click the Select buttons to record each selection. The image below shows the steps to take in order from 1 to 4.

3. To test the result, create a new record and, with the cursor in the new box on the form, press F3 to browse. In our example, you will be browsing the Supplier Name field, but when you select a supplier, their Record ID will be stored in the Supplier field in the Orders database.

If you need any help with a change like this, please get in touch! We'd be happy to look at this and other changes to your databases that could help you work more efficiently.

blog comments powered by Disqus

Month List