Use database as JOBID when using script upload to Accutrace

All things related to the Script feature of AccuZIP6, including the Script Monitor.

Moderators: Chrissy, Steve, Terry, Donna, Dave, Eric, MartyH, Kristen, Geoff, Vince

Post Reply
User avatar
Dave
Site Admin
Posts: 620
Joined: Wed Sep 20, 2006 3:20 pm

Use database as JOBID when using script upload to Accutrace

Post by Dave » Wed Feb 27, 2013 11:59 am

If you would like to use the database name as the JOBID for a file that you're uploading automatically in a script, you can use the following command.

Open your script, and create a new event. Make it a Command event.
Create a new command.
Name it JOBID in script or something that would make sense.
In the command statement syntax below copy/paste the following command.

Code: Select all

com_PresortFolder=ADDBS(JUSTPATH(DBF("_azqualification")))
com_jobid=justfname(forceext(dbf(),""))
ocomEditIni=CREATEOBJECT('editini')
ocomEditIni.IniPath=com_PresortFolder+"Presort.ini"
ocomEditIni.AddIfNotFound=.T.
ocomEditIni.Sectionhdr='[MAILDAT]'
ocomEditIni.Searchfor='JOBID='
ocomEditIni.Replacewith=TRANSFORM(com_jobid)
ocomEditIni.UpdateIni()
Make sure to place this command after the presort event and before the Upload to AccuTRACE event in the script.

User avatar
Eric
Moderator
Posts: 1909
Joined: Tue Sep 19, 2006 3:29 pm
Contact:

Post by Eric » Fri May 06, 2016 11:01 am

If you're not presorting, use this instead:

Code: Select all

ocomEditIni=CREATEOBJECT('editini')
ocomEditIni.IniPath=FORCEEXT(DBF(),"ini")
ocomEditIni.AddIfNotFound=.T.
ocomEditIni.Sectionhdr='[ACCUTRACE]'
ocomEditIni.Searchfor='JOBID='
ocomEditIni.Replacewith=TRANSFORM(com_jobid)
ocomEditIni.UpdateIni()

ocomEditIni.Sectionhdr='[ACCUTRACE]'
ocomEditIni.Searchfor='NOTICEEMAIL='
ocomEditIni.Replacewith="youremail@email.com"
ocomEditIni.UpdateIni()
Chat with an AccuZIP6 technician weekdays from 7-4 PST with AccuZIP6 Live Online Support

Post Reply