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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup.ini - an update based on two fields??? 1

Status
Not open for further replies.

JwithaL

Technical User
Jul 14, 2004
44
How do i write a command in the lookup.ini file that will allow a field to be populated if certain information is in 2 fields not just 1.

Instead of autoupdating our territory field based on either the state which is entered or for the the states that are split into 2... basing it off of the zip code. In dealing with international account some zip codes start off with the same 3 or so digits.

So I would like to write the file to populate the territory field if the state equals "xx" and the territory begins with "xxx"

Is this possible??? Here is a piece of the lookup.ini I created before to state the field names...

[AutoUpdate]
STATE=uTERRITORY
ZIP=uTERRITORY

[uTERRITORY]
Lookup1=STATE
Lookup2=ZIP
Lookup3=left(ZIP,2)
Lookup4=left(ZIP,3)
Lookup5=left(ZIP,4)

AZ=01
NM=01
NC=04
SC=04
DE=05
DC=05
MD=05
VA=05
 
Hi,

[AutoUpdate]
STATE=uTERRITORY
ZIP=uTERRITORY

[uTERRITORY]
Lookup1=STATE
AZ=01
NM=01
NC=04
SC=04
DE=05
DC=05
MD=05
VA=05

Lookup2=ZIP
5001010=01

Lookup3=left(ZIP,2)
KT=Kingston

Lookup4=left(ZIP,3)
TW9=Richmond & Twickenham

Lookup5=left(ZIP,4)
TW9 1L=Richmond

Otherwise=Havent a clue
Overwrite=1


Regards,

Richard.
PRIOR Analytics UK
Winners of the LBA Customer Service Award.
 
Thank you very much Richard, but my fault for not posting my whole lookup.ini and not double checking what I wrote.

[AutoUpdate]
STATE=uTERRITORY, COUNTRY
ZIP=uTERRITORY

[uTERRITORY]
Lookup1=STATE
Lookup2=ZIP
Lookup3=left(ZIP,2)
Lookup4=left(ZIP,3)
Lookup5=left(ZIP,4)

AZ=01
NM=01
NC=04
SC=04
DE=05
DC=05
MD=05
VA=05
WV=05
AL=07
GA=07
MS=07
TN=07
FL=09
KS=10
NE=10
IN=11
KY=11
MI=17
MN=19
ND=19
SD=19
CT=20
ME=20
MA=20
NH=20
RI=20
VT=20
OH=23
ID=24
MT=24
OR=24
WA=24
AK=25
HI=26
CO=27
UT=27
WY=27
LA=30
OK=30
TX=30
AR=31
IA=31
MO=31
WI=33

60=06
610=06
611=06
612=06
613=06
614=06
615=06
616=06
617=06

12=08
13=08
14=08

080=18

As you can see I have the multiple lookup options, but I want to to know if it's possible to make an "and" statement between the lookups instead of an "or" statement. That way the territory field would be populated when the state field and the zip code field met a parameter. The problem is internationaly the first 3 or so numbers in a zip code could be for italy so we have been running into conflicts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top