This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Here's a workflow that gives what you're looking for.
The top branch uses a formula to build the comma separated strings based on the Position number and including the trailing comma. The output tool is configured to write a CSV file with no delimiters (\0) so it essentially writes every line as is, separated by a carriage return. If your requirements ever change, you'll need to manually edit the formula to change the output
However, I noticed that your output consisted exactly of the fields that where not null. If that's the case, and not just a coincidence, the bottom branch is completely dynamic and will handle any number of columns on any row. It starts with a transpose that places all the fields that you care about into 2 columns, Name(field names) and Value(field values), grouped by OrdNum and position. The filter strips out any null values
and the Summarize builds the comma delimited string, incl the trailing comma.
Both give exactly the same output, namely
but the dynamic version should adapt to your actual data with very little modification, probably limited to the Group By fields in the Summarize tool
You'd need a prestep that looks for comma's in the 6 main fields and adds double quotes(") before and after the item if found. The attached contains a Multi field tool on the top branch that does just that