Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Guide to the LOOKUP.INI

Misc

Guide to the LOOKUP.INI

by  richardy  Posted    (Edited  )
LOOKUP.INI

NOTE: sections in red represent new features added since build 3.20.70503.

You can define conditions to update GoldMine field data based on data in other fields in a LOOKUP.INI file. You can set GoldMine to update either:

ᄋ Automatically when data is entered in one or more specified fields
ᄋ When triggered as an automated process event

Each section in LOOKUP.INI contains instructions for one field that you want GoldMine to update. For example, the [City] section will contain update instructions for the City field. The section can contain three types of instructions:

ᄋ Lookup instructions
ᄋ Results of the process and updated values
ᄋ Optional settings

You can create separate lookup rules for each contact file by placing a LOOKUP.INI file in each contact file directory.

Defining Lookup Instructions

Place the following settings in the [Field Name] section of LOOKUP.INI.

Lookupx=field name
field value=y

Each of the variables is described below.

Lookupx: specifies the instruction number.

field name: specifies the field that contains the values GoldMine will compare to perform the update.

field value: specifies the field name entry that GoldMine will use as the match criterion.

Y: specifies the value that GoldMine will enter in [field name] when a match is found.

Multiple field values can be listed below Lookupx=field name. When GoldMine finds one of the match criteria, [field name] will be updated as specified in field value=y. For example:

[uSalesRep]
Lookup1=State
CA=John Doe
NY=Chris Jones
Otherwise=Jim Short
Overwrite=1

In the above example, [uSalesRep] specifies that GoldMine will update the SalesRep field. Lookup1=State sets GoldMine to perform the lookup based on values in the State field. GoldMine will update the SalesRep field with John Doe in all records with a State entry of CA; GoldMine will update SalesRep to Chris Jones in all records with a State entry of NY. The condition Otherwise=Jim Short will update the SalesRep field with Jim Short in all records with any State entry other than CA or NY.

By default, GoldMine will update only fields that contain no value (that is, fields that are empty). To set GoldMine to update all fields, whether or not they contain data, include the command Overwrite=1.

Using dBASE Expressions

To create Lookup instructions with the greatest flexibility, you can use dBASE expressions for both Lookup values and the result values. For example:

[uSalesRep]
Lookup1=substr(contact1->phone1,2,3)
310=Jon Doe
212=Chris Jones
714=contact1->key1

updates the SalesRep field with the entry John Doe in records in which the Phone1 entry has an area code of 310. GoldMine will update SalesRep to Chris Jones in records in which the Phone1 entry has an area code of 212. GoldMine will update SalesRep with the value in the Key1 field in records in which the Phone1 entry has an area code of 714.

Setting up Multiple Lookup Expressions

You can use multiple Lookup expressions within a section. Multiple Lookup expressions allow GoldMine to continue looking for matching entries when the first-listed expression(s) do not locate a match. In multiple Lookup expressions, the number placed after Lookup+such as Lookup1, Lookup2, etc.+indicates the order in which GoldMine will perform the perform the search.

Example 1

[uSalesRep]
Lookup1=substr(contact1->phone1,2,3)
Lookup2=state
310=John Doe
212=Chris Jones
619=Jenny Smith
CA=Bob Martinez
Otherwise=&UserFullName

first updates the SalesRep field based on listed values in the Phone1 field. For records in which no match is found, GoldMine will look for a match in the State field; in those records in which the State entry is CA, GoldMine will update the SalesRep field with Bob Martinez. For records that do not match the two Lookup conditions, the condition Otherwise=&UserFullName will update the SalesRep field with the full name of the currently logged user.

Example 2:
[uSalesRep]
Lookup1=left(contact1->zip,3)
902=Tom
903=Dick
904=Harry
Lookup2=left(contact1->zip,1)
9=Tom
Otherwise=n/a
Overwrite=1

first updates the SalesRep field field based on ZIP code entries. GoldMine will update the SalesRep field with the entry Tom in records with a Zip field entry that starts with 902; GoldMine will update SalesRep with Dick in records with a Zip field entry that starts with 903. GoldMine will update SalesRep with Harry in records with a Zip field entry that starts with 904.

For records that do not have values that match the three criteria, GoldMine will update records based on the first digit in the Zip field. In records in which the first digit in the Zip field is 9, GoldMine will update the SalesRep field with Tom. In records that do not have values that match the two Lookup conditions, the condition Otherwise=n/a will update the SalesRep field with n/a.
The command Overwrite=1 sets GoldMine to update all fields, whether or not they contain data.

Performing Field Updates Automatically

You can configure GoldMine to update fields automatically when a user either:

ᄋ Creates a contact record
ᄋ Enters data in specified fields by including the [AutoUpdate] section in LOOKUP.INI

Updating Fields upon Record Creation

You can configure GoldMine to update one or more fields automatically when a user creates a contact record by including the following statement in the [AutoUpdate] section in LOOKUP.INI.

Place the following setting in the [AutoUpdate] section of LOOKUP.INI.

NewRecord=field(s)

will update the field when a user creates a contact record.

Example 1:

[AutoUpdate]
NewRecord=Key1

will update the Key1 field whenever a contact record is created. To specify the value to appear in the Key1 field, add a [Key1] section to LOOKUP.INI.

Example 2:

[Key1]
lookup1=&username
JDOE=John Doe

will place the full name of user JDOE in the Key1 field.

Example 3:
[URep]
Lookup1=State
CA=Jon
NY=Mike
Otherwise=Mark

will update the Rep field in every new contact record with Jon when the State entry is CA, with Mike when the State entry is NY, and with Mark for any other State entry.

Updating Fields upon Data Entry

You can configure GoldMine to update fields automatically when a user enters data in specified fields by including the [AutoUpdate] section in LOOKUP.INI.

Place the following setting(s) in the [AutoUpdate] section of LOOKUP.INI.

field a=field b

will update field b when a user types a value in field a.

For example:
[AutoUpdate]
State=uSalesRep
Zip=Key5

will update the SalesRep field as soon as a user types a value in the State field, and will update the Key5 field as soon as a user types a value in the Zip field.

You can set GoldMine to update multiple fields when a user types a value in one field. For example:

[AutoUpdate]
State=uSalesRep,Key1

will update both the SalesRep field and the Key1 field when a user types a value in the State field.

Defining Field Updates as an Automated Process

You can configure GoldMine to update fields as specified in an automated process. You can set up updates to multiple fields by immediately triggering subsequent events. You can place subsequent immediate events to cause a "chain effect" of updating fields based on data that GoldMine looked up in previous events.


Launching External Applications when Records are Created and Edited

You can automatically launch external applications when new records are added and edited in GoldMine, so further processing could be done outside of GoldMine as soon as data in GoldMine is updated. The [OnNewRun] allows you to set up external applications for each type of contact related record, while the [OnEditRun] launches applications when a record is changed. Records in the following files can be considered by the [OnNewRun] and [OnEditRun] sections: Contact1, Contact2, Cal, ContHist, ContSupp and OpMgr. In addition, specific record types in Cal, ContHist and ContSupp can be set up to launch different applications. Following is an example of [OnNewRun]:

[OnNewRun]
Cal-S=SaleCApp.exe
Cal-C=CallCApp.exe
Cal=CalApp.exe

ContHist-S=SaleHApp.exe
ContHist-CI=InCallHApp.exe
ContHist=HistApp.exe

ContSupp-P=ProfileApp.exe
Contact1=NewContact.exe

OpMgr-P=Projects.exe

Otherwise=AnyApp.exe
AppendRecNo=1
DisableFromAP=1

The entries under [OnNewRun] and [OnEdtRun] can be specified for each contact related record and record type. For the specified table, GoldMine will first check for a specific RecType entry, and then for a general table entry which is not suffixed with a RecType. For example, when a sale is completed, GoldMine will first check for an entry named ContHist-S=, and if it doesn't exist, GoldMine will check for the general ContHist= entry. If that doesn't exist either, GoldMine will check for the Otherwise= catch-all entry.

The AppendRecNo=1 entry instructs GoldMine to append the RecNo of the new record to the command line, so the completed incoming call from the above example will launch a command like "InCallApp.exe 1234" (where 1234 is the record number of the completed record in the ContHist file). This allows you to send DDE command to GoldMine to query the new record's data.

The DisableFromAP=1 entry instructs GoldMine to disable the [OnNewRun] options if an activity is processed by Automated Processes.

The Otherwise= entry is suffixed with the File+RecType, like "AnyApp Cal-A 1234".

When a new contact record is created and the [AutoUpdate] NewRecord option is specified, it will be executed first so its updates could be used by a subsequent [OnNewRun] Contact1=NewContact.exe entry.

[CalClrCode]

This section will automatically allocate a default colour by specific activity types or specific activity codes within a activity type.

SECTION DESCRIPTION
[CalClrCode] Colour codes can now be dynamically allocated
S-HOT = 9 Colour set to red for forecasted sales with activity codes of HOT
A = 4 All appointments will have the colour default to bright green
C = 7 All calls will have a default colour of white
Otherwise = 12 Default to blue

The table below details the code to colours for the [CalClrCode] section.

CODE COLOUR CODE COLOUR
0 BRBLUE 8 GRAY
1 BRPURPLE 9 RED
2 BRRED 10 GREEN
3 BRCYAN 11 YELLOW
4 BRGREEN 12 BLUE
5 BRYELLOW 13 PURPLE
6 CYAN 14 DKGRAY
7 WHITE 15 BLACK



Example of a LOOKUP.INI File

The following example shows a complete LOOKUP.INI file:

[AutoUpdate]
NewRecord=Key1
State=uSalesRep, Key1
Zip=Key5

[uSalesRep]
Lookup1=substr(contact1->phone1,2,3)
Lookup2=state
310=Jon Doe
212=Chris Jones
619=Jenny
CA=Chris Jones
Otherwise=&UserName
Overwrite=1

[Key1]
lookup1=&username
JDOE=John Doe

[Key5]
Lookup1=left(contact1->zip,3)
902=East
903=West
904=South
Lookup2=left(contact1->zip,1)
9=Nowhere
Otherwise=n/a
Overwrite=1

[OnNewRun]
Cal=CalApp.exe
ContHist-S=SaleHApp.exe
ContSupp-P=ProfileApp.exe
Contact1=NewContact.exe


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top