Adding a Choice List of Users or Contacts

To add a choice list of users:

1    In the Field Editor, create a new field.

2    In the Type list, click Multi-Choice List or Single Choice List.

3    In the Table Containing Choices list, click tblUser.

tblUser cannot be viewed or edited in the Choice Editor.

4    Click Close to apply the changes.

5    Open the project definitions database.

6    Open tblDtsFields and find the record for the new field. In the tWhere field, type:

Where (([nID] >= 0 And [tName] <> '') Or
     [tName] = '<User>') And fOriginator = 0

The [nID] >= 0 condition removes the macros defined in tblUser (the users database):

User ID

User Name

-4

<Contact>

-3

<User>

-2

<Previous Owner>

-1

 <Owner>

 

The user with nID = 0 is the <None> macro.

The fOriginator = 0 condition removes contacts, so that the list contains users only.

To add a choice list of users and contacts:

Use this tWhere clause:

Where (([nID] >= 0 And [tName] <> '') Or
     [tName] = '<User>')

Related Topics

About the Databases

Editing Databases

Deleting Users

Removing Disabled Users from Choice Lists