DroidDB Tip of the Month
DroidDB® Tip for January 2014
Multi-Column Keys
Key values are used in various places in DroidDB such as searching for a record, filtering a dropdown, or filtering entries in a grid. DroidDB only allows you to key on a single value. But what if you wanted to key on multiple values (for example, filter on both LAST_NAME and FIRST_NAME)? This can be done:
- In your table, create another column called FULL_NAME and create an index over that column.
- On your form, create a calculated control (connected to FULL_NAME) with
the expression:
FIRST_NAME & ' ' & LAST_NAME
- Put your key value into a variable (for example, set @var(56) to 'John Smith').
- Use @var(56) as the key to use on FULL_NAME.