Export record which is not in table

Hi all,

I want to export some records using dataport. In that dataport I want to export a record to the external file which is not in the table. Can any one please help me to do this. Eg. My table has following values.

1 xxxx

2 yyyy

But my exported file should contain the following data.

1 xxxx

3 cccc

2 yyyy

Create a global variable and add it in Dataport fields.

If I create a new variable as you told I can create only extra field. But I want to export a new record.

Then take an Integer dataitem and export the values which you want.

That too i need to indent the integer dataitem with my table. If I do like this an error is thrown. you have intended dataitems but the file format is not upxml. How to overcome this. There is no such fileformat is available in Fileformat property

indentation is not possible in Dataports.

Insert all of your data into a temp table first. Then that will have the records from the table as well as the records you manually created. Then you can base your dataport on the Integer data item, using it as a loop to move through the records in your temp table.

Thank you matt,

I tried this way also. But no of records are more. This takes double the time to export.

Well I’m not sure how you expect to be able to pick and choose where to export data that doesn’t exist in the table. Either the data needs to get into the table somehow, or you need to just export that data that is not in the table at the beginning or end of the dataport. While it may take longer, it is the proper way to go about it in this case, in my opinion at least.

If you already have the logic built to decide where to export the “fake” records, then I only have one other thought. That is to build up a text variable of what you want to export, but add a carriage return to the end manually. Then start adding your new line. This would combine two or more lines in the text file into one field, with a carriage return in the middle, that could be exported. You would essentially be bypassing all of the properties like the start and end delimeters, though. And you wouldn’t be able to use it to import.