3 Replies Latest reply on Mar 13, 2017 8:39 PM by TGreen2

    Lookup.ini copy field to another with condition

    TGreen2 Apprentice

      We have our main GoldMine user screen with a mailing address and a physical address. The physical address fields are all custom added fields.

       

      I want to create a lookup.ini for the following use. If a user selects “Yes” on the fields tab then the address field from Contact1 is copied to a user defined address field located in contact2 (I think). Starting with the Fields tab userdef10 If USERDEF10 = Yes I need to copy address1 from contact 1 to UADDRESSCUSTOM (User defined address, Not sure where it's stored, Contact2 I think) Can someone familiar with lookup.ini help here?

       

      Thanks in Advance!

        • 1. Re: Lookup.ini copy field to another with condition
          BJeffe Apprentice

          First, custom fields are limited to 10 characters so uaddresscustom won't work - suggestions are listed below. Open the Notepad and save it in the GoldMine folder (the GoldMine share) on the server and name it Lookup.ini. There are some things that can happen when a new record is created but you don't mention needing that so we'll save that for another time.  Custom fields are created in Contact2 and the table will have to be rebuilt after creating the fields.  Be sure everyone is logged out of GoldMine before you create the custom fields and be sure you do a backup first. Then add the following to the Lookup.ini file.

          [AutoUpdate]

               Userdef10 = Uaddr1cust, Uaddr2cust, uUaddr3cust, Ucity, Ustate, Uzip

          [uaddr1cust]

               Lookup1 = Userdef10

               Yes = Address1

               Otherwise = " "

               Overwrite = 1

          [Uaddr2cust]

               Lookup1 = Userdef10

               Yes = Address2

               Otherwise = " "

               Overwrite = 1

          [Uaddr3cust]

               Lookup1 = Userdef10

               Yes = Address3

               Otherwise = " "

               Overwrite = 1

          [Ucity]

               Lookup1 = Userdef10

               Yes = City

               Otherwise = " "

               Overwrite = 1

          [Ustate]

               Lookup1 = Userdef10

               Yes = State

               Otherwise = " "

               Overwrite = 1

          [Uzip]

               Lookup1 = Userdef10

               Yes = Zip

               Otherwise = " "

               Overwrite = 1

          1 of 1 people found this helpful
          • 2. Re: Lookup.ini copy field to another with condition
            Shaul.Bel Apprentice

            You can create userdef fields with length of 100 characters with no problem.

            So, you can create the userdef fields that you need probably you need at least 4 or 5 fields (including the CITY and the ZIP).

            If you have already a lookup.ini you will have to update it as follows

             

            Newrecord=UADDRESS1,UADDRESS2,UADDRESS3,UCITY,UZIP

             

            [autoupdate]

            USERDEF10=UADDRESS1,UADDRESS2,UADDRESS3,UCITY,UZIP

            ADDRESS1=UADDRESS1

            ADDRESS2=UADDRESS2

            ADDRESS3=UADDRESS3

            CITY=UCITY

            ZIP=UZIP

             

            [UADDRESS1]

            lookup1=&(contact2->USERDEF10)

            YES=&(contact1->ADDRESS1)

            NO=

            overwrite=1

             

            [UADDRESS2]

            lookup1=&(contact2->USERDEF10)

            YES=&(contact1->ADDRESS2)

            NO=

            overwrite=1

             

            [UADDRESS3]

            lookup1=&(contact2->USERDEF10)

            YES=&(contact1->ADDRESS3)

            NO=

            overwrite=1

             

            [UCITY]

            lookup1=&(contact2->USERDEF10)

            YES=&(contact1->CITY)

            overwrite=1

             

            [UZIP]

            lookup1=&(contact2->USERDEF10)

            YES=(contact1->ZIP)

            NO=

            overwrite=1

            1 of 1 people found this helpful
            • 3. Re: Lookup.ini copy field to another with condition
              TGreen2 Apprentice

              Thanks all for the help with this.  Funny, we have had GoldMine since the DOS days and are just now using this great feature!!