DroidDB Tip of the Month
DroidDB® Tip for December 2015
Translating the Record Not Found Message in a JUMP
DroidDB is primarily an English product. We don't do anything to preclude other languages...but we don't do anything to specifically accomodate them either. Menus can be translated using a custom menu. Buttons and Message Boxes can be translated when you create them. Translating "Record not found" for RECORD | SEARCH and OPTION | FILTER | PREDEFINED is discussed in the October 2015 tip of the month. However there is a "Record not found" message when doing a JUMP that you might also want translated.
Say you are jumping from the Company form (over the COMPANY table) to the Employee form (over the EMPLOYEE table) keyed on COMPANY_NAME. Say you want the message "No employees found" to be displayed there are no employee records for the current company.
First, create a lookup control on the company form:
- Open the company form in the form designer.
- Select CONTROL | LOOKUP from the menu.
- When asked to select a table, choose EMPLOYEE.
- When asked for the search key, choose COMPANY_NAME.
- When asked if you want to save the value found, choose YES.
- When asked where to save the value, select @var(47).
- When asked to select a column to retrieve, selese COMPANY_NAME.
- Close the properties box.
Then, still in the company form, select EDIT | MACROS/EVENTS to creat a macro called Jump.
The Jump macro has four steps:
Step 1: Skip, set "num" to: if @var(47) <> '' then 2 else 0
Step 2: Message Box 'No employees found' (translated of course)
Step 3: Return From Macro
Step 4: Jump, select COMPANY_NAME as the search key and Employee as the name of the form to jump to
Close the macro editor.
Lastly, still in the company form, select CONTROL | BUTTON. Change the actions from RECORD | CLOSE to RUN MACRO and set the macro name to Jump. Click OK to close the properties dialog.