cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

CSV Plugin - Infotable disorder

bfayolle
1-Newbie

CSV Plugin - Infotable disorder

Hello,

CSV plugin allow to write CSV files using Infotable with specific Datashape. There isdocumentation on the market place, but procedure describe does not work really. In fact wirteCSV function does not wirte column in the same order as describe inthe DataShape .... if my fields in the datashape are : ID, Height, Age, CSV write function will write Height, ID, Age .. Do you know some workaround ?

Many Thanks

Brice

6 REPLIES 6
qn
1-Newbie
1-Newbie
(To:bfayolle)

Hi,

Actually I have a ticket support for this issue. The column order of InfoTable and the DataShape are not the same.

By the way, can you please export your DataShape to .xml, open it and look at the "FieldDefinition" order ? In my case, the InfoTable column order follow this "FieldDefinition" order.

bfayolle
1-Newbie
(To:qn)

Hi,

In My case the infoTable column order does not follow the field definition order :

ScreenShot114.jpg

ScreenShot113.jpg

Cheers,

Brice

qn
1-Newbie
1-Newbie
(To:bfayolle)

Hi,

I mean the column order of the InfoTable returned by the CSVwrite function.

bfayolle
1-Newbie
(To:qn)

Hi,

i did some investigation related bug.

You must use an INFOTABLE return in the service which generate the CSV, below code works good (with good datashape order in the CSV) :

Not clearly mentionned in the CSV pluggin documentation.

ScreenShot115.jpg

ScreenShot118.jpg

If you don't use return, CSV is generated, but not in the good order of the Datashape.

ScreenShot116.jpg

ScreenShot117.jpg

qn
1-Newbie
1-Newbie
(To:bfayolle)

You can see that, by default, the InfoTable column order follow the field definition order: TestDateTime, Height, ID, Gender, Age. Even if these field are reordered in the DataShape, the result does not change. I tried your method with a query (QueryPropertiesHistory, QueryNamed...) but it doesn't work

bfayolle
1-Newbie
(To:qn)

Another question : the header of the CVS files is based on the name of the Datashape Fields ... Naming convention is very restrictive .. you can't add number in the name . i need number and special characters in my CSV column name, for Example "3. Gender" .. how to do that ?

Thanks very much

Brice

Top Tags