I am trying to migrate to Pan X - I am a long time user of Pan. I have a situation where I have a Jobs database that in its .ini file opens an Address database as secret. The Last Name field triggers a procedure that looks up the person in the Address database and transfers a bunch of the information to the Jobs database, without opening a visible window from the Address database. This is a fairly common procedure I would bet. I use these methods on several other databases in Pan 6 without fail. I can’t seem to get this to work in Pan X. I am sure it is pretty obvious what I am doing wrong, but I am stumped. I am including the ini procedure and the addlookup procedure as text files.
.ini procedure
global vdate,vtmoney,vjob,vfirst,vmiddle,vlast,vsecond,vadd,vcity,vst,vzip,vhome,vbus,vinst
global vfax,waswindow,vss,vlocal,vexpt,vstat,vbdate,vrobe,vlmod,vtmoney,vemail,vcode,vcell
global VscWage,vrot,vpot,vseason
GoForm “Data Entry”
LastRecord
OpenSecret “AddressFile”
OpenSecret “Instruments”
OpenSecret “LiveWages14”
OpenSecret “LiveWages15”
OpenSecret “LiveWages16”
OpenSecret “LiveWages17”
OpenSecret “LiveWages18”
Addlookup procedure:
global vss,vein,vrobe,vinst,vsecond,vemail,vcell,vcode,vmiddle,vcorp,vcorpname,vcaid,vw2,vw9,vi9,vbackup,vmpinst
vfirst=First
vlast=Last
vcorp=Corp
vcorpname=CorpName
«waswindow»= info(“WindowName”)
Window “AddressFile:secret”
SelectAll
Select «First Name»=vfirst AND «Last Name»=vlast
;debug
if info(“Selected”) = info(“Records”)
Message “No Records Selected”
Window «waswindow»
Stop
endif
if info(“Selected”) > 1 AND info(“Selected”) < info(“Records”)
Message “Duplicate Records Selected”
; Window «waswindow»
OpenFile “AddressFile”
Stop
endif
vfirst=«First Name»
vmiddle=«Middle Name»
vlast=«Last Name»
vsecond=«Second Name»
vcorpname=CorpName
vadd=Address
vcity=City
vst=State
vzip=Zip
vhome=Phone
vbus=Service
vcell=«CellPhone»
vemail=«E-mail»
vss=«SS#»
vein=«EIN#»
vcaid=«CAID#»
vlocal=«AFM #»
vexpt=Exemptions
vstat=Status
vbdate=BDate
vrobe=Robe
vinst=Instrument
vmpinst=Instrument
vlmod=LastMod
vcode=Code
vw2=W2
vw9=W9
vi9=I9
vbackup=Backup
Window «waswindow»
First=vfirst
Middle=vmiddle
Last=vlast
;if vsecond=""
; Last=vlast
;else
; Last=vlast+" "+vsecond
;endif
Street=vadd
City=vcity
State=vst
Zip=vzip
Home=vhome
Service=vbus
Cell=vcell
email=vemail
if vcorp=“Yes”
CorpName=vcorpname
«EIN#»=vein
«CA ID#»=vcaid
if vss > 0 «SS#»=vss endif
else
if vss > 0 «SS#»=vss endif
endif
«AFM #»=vlocal
Exemptions=vexpt
Status=vstat
BirthDate=vbdate
Robe=vrobe
Inst=vinst
GSInst=vinst
MPinst=vmpinst
Sequence=lookup(“Instruments”,“Inst”,Inst,“seqnum”,0,0)
LastMod=vlmod
Code=vcode
W2=vw2
W9=vw9
I9=vi9
Backup=vbackup
call .MPCartage
Field Job