Can dataitems be indented in a dataport? If yes how and how can I export different values from different tables in same dataport?
Thanks for your help!!
Can dataitems be indented in a dataport? If yes how and how can I export different values from different tables in same dataport?
Thanks for your help!!
No can’t be done, unfortunately.
You can put different tables together in a dataport and use some code for fitering
Like Daniel said, you cannot indent.
You can also make a report and write a export manualy or using a dataport on a temporary buffer table.
What version are you using?
You can indent on a dataport in 4.00. I think in 3.7 also.
When I have found I really need to get a “idented” type export, I use a report then create a generic “Exportfield” function that carrys a parameter of EOL (End of Line) as a bool to specify end of record export.
I can provide a copy of the function on here if you like?
Only for UPXML, which hardly ever used anyway. For “normal” use of dataports it is not possible to indent, the compiler won’t even let you do it.
Yes, you are correct the file format must be UPxml to indent.
Yep I noticed that too. I am using 3.7A but I also tested it in 4.0 with no success. So I guess export using the report is the only way to export values from different tables.
Thanks all!!
No you can use dataports to export from different tables, you just can’t indent. For instance if you need to export all your sales orders, you can create one dataitem for the headers and one dataitem for the lines in one dataport. The resulting file will just have one big block of header records and one big block of line records.
but then again I run into the issue of filtering the data …
So I end up using the Record variable for sales line or use report and create the export file by code.
You could also have a sales line dataitem only and redundantly export header information on each line using variables in the dataport fields, so you’d have a file like this:
HdrField1,HdrField2,HdrField3,LineField1,Linefield2,LineField3,LineField4,LineField5
You’d just have to make your dataport smart enough to only get a new sales header if the document number changes.
Hey MissNavision,
Would you like that snippet of code or are you all good?
Tony
Thanks Daniel!!
That did help …
Hi Tony,
for now I am good to go. thanks!!
Thanks all!!