code1, code2, code3 are literals? or the values of the 1st, 2nd, 3rd lineitems 'code'?
can you post an example with values that you need?
no the code1,code2 etc are all values from each related child record.
I think you need to construct your output using a script and a dummy (worker) text field for the output. Each record would be a new line in your exported .csv. Within the one output field, you would format your data programmatically, with comma separation.
yes i think that may be my only option, then I can export that field only (export field contents as a csv)
you may need a concatenated field in items
code_amount = code & "," & amount
then in parent use List() to get this related field into the parent order
this will give you a return delimited result that can be converted to comma-separated with Substitute()
Substitute ( List ( items::code_amount ) ; Char(13) ; "," )
so use your regular fields in the export and this new field (in the order)
ok thanks, a bit of work on this one..
Also I can also export as XML, its easier read but I assume no easier formatting out in this fashion?
xml could be converted (as needed) from FMPXMLRESULT grammar (export format) to TEXT how you need it. and yes, it could take some work, especially because you have related records.
If you don't like the calculations, then you can loop script 'gathering' the values into variable(s) and/or global field(s). Export from there as needed to .csv