Hi,
Is it possible to know how many fields contains the current row imported by my dataport?
To explain, I have 59 variables defined in the dataportfields of my dataitem. I would like to get an error message if my CSV file doesn't contains 59 fields.
For example, if it contains 2 fields, the dataport import the 2 fields and set the others to default values. I would like to avoid it. Do you have any idea?
Thx
0
Comments
If you only have 2 or 10 fields and the dataport has the 59 fields you will get an error on the import.
you however can have only two with values and the others with nothing.
A structure like:
"Value1";"Value2";;;;;(x times till 59)
A text array can be used to do this more easily. And you'll have to use EVALUATE to convert between text and other data types.
My Blog - nav.education
It's the solution that I use.
But my customer want to know if the import file is correct, that means i have to check:
[*]if the file has the good number of colomn (They want a message like this: Your file format is wrong: Missing Columns...)
[*]if each field has the good type (but they send me blank for a Integer/Decimal = 0 so I have to disable the EVALUATE for Integer,Decimal fields,...)