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:

  1. Open the company form in the form designer.
  2. Select CONTROL | LOOKUP from the menu.
  3. When asked to select a table, choose EMPLOYEE.
  4. When asked for the search key, choose COMPANY_NAME.
  5. When asked if you want to save the value found, choose YES.
  6. When asked where to save the value, select @var(47).
  7. When asked to select a column to retrieve, selese COMPANY_NAME.
  8. 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.

 

Back to List »

Visit our store

Top rated! I needed a solid database application development tool for mobile devices. I chose DroidDB for Android OS because it provided a way to get a strong product to market quickly. DroidDB is relational, gives me control over form layout, handles macros, and supports events. It works on all Android versions I have tried and is a great companion product to SYWARE’s VisualCE.

Mark Read, President
SyntegraTech, Inc.

signup for our newsletter