<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>THE LOOKUP.INI FILE CLEARLY EXPLAINED</title>
</head>

<body>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
            <td valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                              <td><a href="http://www.1stdirect.com"><img src="http://www.goldminesuccess.com/images/1stdirecta.jpg"/></a></td>
                              <td><a href="http://www.1stdirect.com/events"><img src="http://www.1stdirect.com/images/syk.gif"/></a></td>
                        </tr>
                        <tr>
                              <td colspan="2" style="padding:12px 0px "><div align="center">
                                    <h2 style="color:#03C"><strong>THE LOOKUP.INI FILE CLEARLY EXPLAINED </strong></h2>
                              </div></td>
                        </tr>
                        <tr>
                              <td width="388"><img src="lookup.png" width="301" height="181" /></td>
                              <td width="262">&nbsp;</td>
                        </tr>
                  </table>
                  <p>The Lookup.ini file does not exist in GoldMine until you create it using a text editor such as NOTEPAD. It is saved/stored in the root directory of the GoldMine install folder on the server.</p>
                  <p><strong>Lookup.ini performs functions based on a trigger and resulting action:</strong></p>
                  <ul>
                        <li>Update a Contact1 or Contact2 field based on an entry in another Contact1 or Contact2 field.</li>
                        <li>Update Contact1 or Contact2 field based on an expression.</li>
                        <li>Launch an external application based on an expression or the occurrence of a specified field entry.</li>
                        <li>Apply an activity color code to calendar activities based on either an activity type, an activity code, or both.</li>
                        <li>Launch an external application or GoldMine Macro when a new record is created. </li>
                  </ul>
                  <p><strong>NOTE:</strong> If the Lookup.ini script updates a field based on updates to another field, the update of the second field does not follow the update access security for the second field set in the Field Properties dialog box. </p>
                  <p><strong>Example:</strong> If you use a Lookup.ini to update Key2 based on updates to Key1 and the user making the updates has field update rights to Key1, but not to Key2 – but the user can update Key1 and the Lookup.ini is able to make updates Key2.</p>
                  <p><strong>NOTE:</strong>A Lookup.ini  that is configured to automatically update a Key field will only do so if the Key field is empty. This is to ensure that a value specifically entered by the user is not overwritten.</p>
                  <h2>The Various Lookup.ini Sections:</h2>
                  <p><strong>[AutoUpdate]</strong>:Specifies trigger fields (fields that create an update if modified) and the resulting field to be updated.</p>
                  <p>The fieldname section <strong>[Field_to_be_updated]</strong> comprises the specific instructions and parameters used when updating the specified GoldMine field. </p>
                  <p><strong>[OnNewRun]</strong> and <strong>[OnEditRun]</strong>: Determines the external application to launch when a new record is created (a contact record or a supplemental file record adding a new calendar activity).</p>
                  <p><strong>[CalClrCode]</strong>: Specifies the color to assign to the activity being scheduled.                  </p>
                  <h2>Using dBASE Expressions</h2>
                  <p>To   create Lookup instructions with the greatest flexibility, you can use   dBASE expressions for both Lookup values and the result values.                        </p>
                  <p>Note: <a href="http://www.prior-analytics.com/documents/goldmine-version-4-0/dbaseexp.pdf" target="_blank">dBASE expressions</a> are beyond the scope of this course/class. However you are encouraged to research and learn about using dBASE expressions with GoldMine. If you are looking to write a dbase expression there is an inbuilt   expression tester within GoldMine that can be accessed by Ctrl+Shift+D.</p>
                  <p> <strong>For example:</strong></p>
                  <p> [uSalesRep]<br />
                        Lookup1=substr(contact1-&gt;phone1,2,3)<br />
                        310=Jon Doe<br />
                        212=Chris Jones<br />
                        714=contact1-&gt;key1</p>
                  <p> updates   the uSalesRep 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 uSalesRep with the value in the Key1 field in   records in which the Phone1 entry has an area code of 714.</p>
                  <h2>Setting up Multiple Lookup Expressions</h2>
                  <p> 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 search./p&gt; </p>
                  <p><b>Example 1:</b></p>
                  <p> [uSalesRep]<br />
                        Lookup1=substr(contact1-&gt;phone1,2,3)<br />
                        Lookup2=state<br />
                        310=John Doe<br />
                        212=Chris Jones<br />
                        619=Jenny Smith<br />
                        CA=Bob Martinez<br />
                        Otherwise=&amp;UserFullName</p>
                  <p>First   updates the uSalesRep 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=&amp;UserFullName will update the SalesRep field with the full   name of the currently logged user.</p>
                  <p><strong>Example 2:</strong></p>
                  <p> [uSalesRep]<br />
                        Lookup1=left(contact1-&gt;zip,3)<br />
                        902=Tom<br />
                        903=Dick<br />
                        904=Harry<br />
                        Lookup2=left(contact1-&gt;zip,1)<br />
                        9=Tom<br />
                        Otherwise=n/a<br />
                        Overwrite=1<br />
                  </p>
                  <p> 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.</p>
                  <p>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.<br />
                        The command Overwrite=1 sets GoldMine to update all fields, whether or not they contain data.</p>
                  <h2>Performing Field Updates Automatically</h2>
                  <p>You can configure GoldMine to update fields automatically when a user either:</p>
                  <ul>
                        <li> Creates a contact record</li>
                        <li> Enters data in specified fields by including the [AutoUpdate] section in LOOKUP.INI </li>
                  </ul>
                  <h2>Updating Fields upon Record Creation</h2>
                  <p> 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./p&gt; </p>
                  <p> Place the following setting in the [AutoUpdate] section of LOOKUP.INI.</p>
                  <p> NewRecord=field(s)</p>
                  <p> will update the field when a user creates a contact record.</p>
                  <p><strong>Example 1:</strong></p>
                  <p> [AutoUpdate]<br />
                        NewRecord=Key1</p>
                  <p> 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.</p>
                  <p> [Key1]<br />
                        lookup1=&amp;username<br />
                  JDOE=John Doe</p>
                  <p>will place the full name of user JDOE in the Key1 field.</p>
                  <p><strong>Example 2:</strong></p>
                  <p>[AutoUpdate]<br />
NewRecord=URep<br />
                  </p>
                  <p> [URep]<br />
                        Lookup1=State<br />
                        CA=Jon<br />
                        NY=Mike<br />
                        Otherwise=Mark<br />
                  </p>
                  <p> will   update the uRep 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.</p>
                  <h2> Updating Fields upon Data Entry</h2>
                  <p>You   can configure GoldMine to update fields automatically when a user   enters data in specified fields by including the [AutoUpdate] section in   LOOKUP.INI.</p>
                  <p> Place the following setting(s) in the [AutoUpdate] section of LOOKUP.INI.</p>
                  <p> field a=field b</p>
                  <p>will update field b when the user enters a value in field a.</p>
                  <p><strong>For example:</strong></p>
                  <p>[AutoUpdate]<br />
                        State=uSalesRep<br />
                        Zip=Key5</p>
                  <p>will   update the uSalesRep 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.</p>
                  <p>You can set GoldMine to update multiple fields when a user types a value in one field.</p>
                  <p><strong>For example:</strong></p>
                  <p> [AutoUpdate]<br />
                        State=uSalesRep, Key1</p>
                  <p> will update both the SalesRep field and the Key1 field when a user types a value in the State field.</p>
                  <h2>Updating Fields Based On An Expression (dBASE)</h2>
                  <p class="Indent_1">A Company has quarterly sales figures stored in 4 seperate fields (<strong class="emphasis">USales Qtr1-USalesQtr4</strong>) for each customer. It requires a Total (<strong class="emphasis">UTotal</strong>) field that sums up business quarters one through four and returns a value. </p>
                  <p class="Indent_1">The <strong class="emphasis">[AutoUpdate]</strong> section includes four trigger fields: <strong class="emphasis">Usales Qtr1-4</strong>. When any one of these fields updates, the Lookup.ini runs the subroutine <strong class="emphasis">UTotal</strong>.</p>
                  <p class="Indent_1">The <strong class="emphasis">Lookup1</strong> command looks in a placeholder field. In the example, <strong class="emphasis">Contact1-&gt;Company</strong> is referenced. No values are listed under Lookup1; therefore, no match is found. The Lookup.ini progresses to the <strong class="emphasis">Otherwise</strong> command.</p>
                  <p>[AutoUpdate]<br />
                        UsalesQtr1=UTotal<br />
                        UsalesQtr2=UTotal <br />
                        UsalesQtr3=UTotal <br />
                        UsalesQtr4=UTotal <br />
                        [UTotal]<br />
                        Lookup1=Contact-&gt;Company <br />
                        Otherwise=&amp;(Contact2-&gt;UsalesQtr1 + Contact2-&gt;UsalesQtr2 + Contact2-&gt;UsalesQtr3 + Contact2-&gt;UsalesQtr4) <br />
                        Overwrite=1</p>
                  <h2> Defining Field Updates as an Automated Process </h2>
                  <p>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 &quot;chain effect&quot; of updating fields based on data that GoldMine   looked up in previous events.</p>
                  <h2> Launching External Applications when Records are Created and Edited</h2>
                  <p> 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<strong> [OnNewRun] </strong>allows you to set up external applications for each type of   contact related record, while the<strong> [OnEditRun] </strong>launches applications when   a record is changed. Records in the following files can be considered   by the<strong> [OnNewRun]</strong> and <strong>[OnEditRun] </strong>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. </p>
                  <p>Following is an example of <strong>[OnNewRun]</strong>:</p>
                  <p> [OnNewRun]<br />
                        Cal-S=SaleCApp.exe<br />
                        Cal-C=CallCApp.exe<br />
                        Cal=CalApp.exe</p>
                  <p> ContHist-S=SaleHApp.exe<br />
                        ContHist-CI=InCallHApp.exe<br />
                        ContHist=HistApp.exe</p>
                  <p> ContSupp-P=ProfileApp.exe<br />
                        Contact1=NewContact.exe</p>
                  <p> OpMgr-P=Projects.exe</p>
                  <p> Otherwise=AnyApp.exe<br />
                        AppendRecNo=1<br />
                        DisableFromAP=1</p>
                  <p> The   entries under <strong>[OnNewRun]</strong> and <strong>[OnEdtRun]</strong> 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 (S) 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.</p>
                  <p> 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 &quot;InCallApp.exe 1234&quot; (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. </p>
                  <p> The   DisableFromAP=1 entry instructs GoldMine to disable the<strong> [OnNewRun]</strong> options if an activity is processed by Automated Processes.</p>
                  <p> The Otherwise= entry is suffixed with the File+RecType, like &quot;AnyApp Cal-A 1234&quot;.</p>
                  <p> When   a new contact record is created and the <strong>[AutoUpdate] </strong>NewRecord option   is specified, it will be executed first so its updates could be used by a   subsequent [OnNewRun] Contact1=NewContact.exe entry.</p>
                  <h2>Running Macros</h2>
                  <p >A macro is a button or hot key shortcut representing an instruction/action, or a series of instructions/actions, or text inputs. Macros can also be added to the Lookup.ini file.</p>
                  <p >When you create a macro, it is saved to a file called &lt;username&gt;.mac. The macros are saved in the \GoldMine\macros\ directory. This file lists all the recorded macros with numbers associated to them. When you open this file in a text editor (such as Notepad), you see a list of all the macros that you have recorded. In the list, there is a number that precedes the section with the Title and Description you added when you recorded the macro. </p>
                  <p >To use a macro in the <span class="address">Lookup.ini</span>, you must use the number associated with the macro in the <span class="address">&lt;username&gt;.mac</span> file. For example: </p>
                  <table width="378" cellspacing="0">
                        <col width="312px" class="TableStyle-Table3-Column-Column1" />
                        <col width="312px" class="TableStyle-Table3-Column-Column1" />
                        <thead>
                              <tr class="TableStyle-Table3-Head-Header1">
                                    <td width="167"><p><strong>&lt;username&gt;.mac </strong></p></td>
                                    <td width="205"><p><strong>Field Description</strong></p></td>
                              </tr>
                        </thead>
                        <tbody>
                              <tr>
                                    <td valign="top"><p>[800]</p>
                                          <p>T=SyncWithOutlook</p>
                                          <p>D=Synchronize with Outlook</p>
                                          <p>F=user.800</p>
                                          <p>H=85,0,1441793</p>
                                          <p>S=1</p></td>
                                    <td valign="top"><p>                                          macro number</p>
                                          <p>Title</p>
                                          <p>Description</p>
                                          <p>&#160;</p>
                                          <p><br />
                                          Hot Key Code</p>
                                          <p>Playback Speed</p></td>
                              </tr>
                        </tbody>
                  </table>
                  <p>When you use a macro as part of the Lookup.ini, use the following format for example:</p>
                  <p>[OnNewRun] <br />
                        Contact1 = &amp;PlayMacro(800) </p>
                  <p>What this will do is watch the Contact1 database table. <br />
                        If there is a change, then macro 800 is run. In this example, if the Contact1 table is modified, GoldMine will synchronize with Outlook.</p>
                  <h2>Apply an activity color code to calendar activities based on either an activity type, an activity code, or both </h2>
                  <p>[CalClrCode]</p>
                  <p> This   section will automatically allocate a default color for specific   activity types or specific activity codes within an activity type.</p>
                  <p><strong>SECTION DESCRIPTION</strong></p>
                  <p> [CalClrCode] Colour codes can now be dynamically allocated <br />
                        S-HOT = 9 Colour set to red for Forecasted Sales (S) with activity codes of HOT <br />
                        A = 4 All Appointments (A) will have the color default to bright green <br />
                        C = 7 All Calls (C) will have a default color of white <br />
                        Otherwise = 12 Default to blue </p>
                  <p> The table below details the code to colors for the [CalClrCode] section.</p>
                  <table width="410" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                              <td width="181">0 BRBLUE </td>
                              <td width="229">8 GRAY </td>
                        </tr>
                        <tr>
                              <td>1 BRPURPLE </td>
                              <td>9 RED </td>
                        </tr>
                        <tr>
                              <td>2 BRRED </td>
                              <td>10 GREEN </td>
                        </tr>
                        <tr>
                              <td>3 BRCYAN </td>
                              <td>11 YELLOW</td>
                        </tr>
                        <tr>
                              <td>4 BRGREEN </td>
                              <td>12 BLUE</td>
                        </tr>
                        <tr>
                              <td>5 BRYELLOW </td>
                              <td>13 PURPLE</td>
                        </tr>
                        <tr>
                              <td>6 CYAN </td>
                              <td>14 DKGRAY</td>
                        </tr>
                        <tr>
                              <td>7 WHITE </td>
                              <td>15 BLACK</td>
                        </tr>
                  </table>
                  <p> <strong>Example of a LOOKUP.INI File</strong></p>
                  <p> The following example shows a complete LOOKUP.INI file:</p>
                  <p> [AutoUpdate]<br />
                        NewRecord=Key1<br />
                        State=uSalesRep, Key1<br />
                        Zip=Key5</p>
                  <p> [uSalesRep]<br />
                        Lookup1=substr(contact1-&gt;phone1,2,3)<br />
                        Lookup2=state<br />
                        310=Jon Doe<br />
                        212=Chris Jones<br />
                        619=Jenny <br />
                        CA=Chris Jones<br />
                        Otherwise=&amp;UserName<br />
                        Overwrite=1</p>
                  <p> [Key1]<br />
                        lookup1=&amp;username<br />
                        JDOE=John Doe</p>
                  <p> [Key5]<br />
                        Lookup1=left(contact1-&gt;zip,3)<br />
                        902=East<br />
                        903=West<br />
                        904=South<br />
                        Lookup2=left(contact1-&gt;zip,1)<br />
                        9=Nowhere<br />
                        Otherwise=n/a<br />
                        Overwrite=1</p>
                  <p> [OnNewRun]<br />
                        Cal=CalApp.exe<br />
                        ContHist-S=SaleHApp.exe<br />
                        ContSupp-P=ProfileApp.exe<br />
            Contact1=NewContact.exe</p></td>
      </tr>
</table>
</body>
</html>
