Developing Sun Master Indexes (Repository)

Step 6: Define Master Index User Code Lists (Repository)

If you specified a value for theConstrained By and User Code properties of a field, you must define the user code values for those fields. Below is a sample insert statement for the sbyn_user_code table.

insert into sbyn_user_code (code_list, code, descr, format, input_mask, value_mask) values (’AUXIDDEF’, ’CC’, ’CREDIT CARD’, ’[0-9]{16}’, ’DDDD-DDDD-DDDD-DDDD’, ’DDDD^DDDD^DDDD^DDDD’);

To learn more about the sbyn_user_code table, see Master Index Database Table Description for sbyn_user_code (Repository). Complete Step 5: Define Master Index Code Lists (Repository) before beginning this step.

ProcedureTo Define a User Code List

  1. In the Projects window, right-click the Database Script node of the master index project.

  2. In the Database context menu, select New.

  3. Enter the name of the script, and then click OK.

    The file opens in the NetBeans editor.

  4. Use the above sample to define a value for the user code drop-down list and the required format for the dependent fields.

  5. Repeat the above step for each drop-down list value and type (for example you might have one list for credit cards and another for postal codes and their corresponding cities).

  6. Save and close the file.

  7. Continue to Step 7: Create Custom Master Index Database Scripts (Repository) or to Step 8: Create the Master Index Database Structure (Repository) if you do not need to create any custom database scripts.