Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Super Contributor
rmikolainis
Posts: 1,252
Registered: 10-29-2008
0

Exporting Headers from Visual Integrator

 I just needed to do this, and thought it would be a good topic to bring over from the old forums.

 

Courtesy of Slade Hornick:

Assuming you are exporting a csv (comma delimited file) you can add the following perform logic to one of the data elements on "BEFORE ASSIGN"

Just save this in a text file in your ../mas90/vi directory named something like: export_headers.pl and then on the data tab select a field click the perform logic button and put ../vi/export_headers.pl in the perform logic command on BEFORE ASSIGN. It shouldn't matter which field - I had put it on the last one in the list and it worked OK for me.

! Add Column Headers to VI Export Job
! Slade Hornick
! slade@hornickconsulting.com
! 03/24/2006
!
if ct then exit
open (hfn,iol=*)"../vi/viijob.soa"
select * from lfo begin vi2_job_name$ end vi2_job_name$+$fe$
rec$+=vii_field_name$+","
next record
close (lfo)
print (1)mid(rec$,1,len(rec$)-1)
ct++
exit

Super Contributor
DFeller
Posts: 2,944
Registered: 10-28-2008
0

Re: Exporting Headers from Visual Integrator

I don't know if you've looked at a current version of MAS but the option to "Export column headers as first line" is right in the Export Job Maintenance under the Options button.

 

Dawn

Super Contributor
rmikolainis
Posts: 1,252
Registered: 10-29-2008
0

Re: Exporting Headers from Visual Integrator

Wierd, I don't have any options button in Export Job Maint. This is in 4.3 also.
Super Contributor
DFeller
Posts: 2,944
Registered: 10-28-2008
0

Re: Exporting Headers from Visual Integrator

Are you trying this for a business framework file or legacy file?

 

Dawn

Super Contributor
rmikolainis
Posts: 1,252
Registered: 10-29-2008
0

Re: Exporting Headers from Visual Integrator

Its Inventory tables.
Super Contributor
DFeller
Posts: 2,944
Registered: 10-28-2008
0

Re: Exporting Headers from Visual Integrator

Inventory is still a legacy module.  So, no options button.

 

Dawn

Super Contributor
rmikolainis
Posts: 1,252
Registered: 10-29-2008
0

Re: Exporting Headers from Visual Integrator

[ Edited ]

This is the only way to get headers on VI exports until ALL modules are on the 4x framework, correct?

Message Edited by rmikolainis on 01-23-2009 03:00 PM
Contributor
JSousa
Posts: 18
Registered: 06-14-2010
0

Re: Exporting Headers from Visual Integrator

[ Edited ]

You say this is for inventory. Will this also work on PR or will I have to change the logic?

 

When I attempted to run this I got a VI2Job.SOA not found Error... nevm this putting in the wrong place.

 

Now its telling me my own CSV file does not exsist. I just looked into the file system and it is there its just empty.

Super Contributor
rmikolainis
Posts: 1,252
Registered: 10-29-2008
0

Re: Exporting Headers from Visual Integrator

What table are you trying to export from payroll?

Contributor
JSousa
Posts: 18
Registered: 06-14-2010
0

Re: Exporting Headers from Visual Integrator

theres only 2 PR.EMPL and PR.DEPT