Hello @lsugumar ,
The process for transposing columns into headers is mostly the same--you only need to ensure the correct group-by attribute is set in the Aggregator. In your case, it would be form_id.
Since your output format is Excel, one option is to take advantage of the Use Column Names as Attributes parameter in the Excel writer, so all forms use the same attribute names. With this option, you need to map your label to an Excel column name (eg, A-Z) using a transformer like the CharacterCodeReplacer.
In the Excel writer feature type, set Use Column Names as Attributes to 'Yes' and Output Field Names to 'No' and enable Dataset Fanout in the Excel writer based on form_id.
I have attached an example of this workflow. Note that the CharacterCodeReplacer works only if the number of labels is less than 27 in a form. You will need to find a way to map the 27th label to AA, 28th to AB, etc.
Hi @debbiatsafe,
Thank you for your response. Just curious to know, in your AttributeExposer, did you import data as "from feature cache"? If that's the case, when I do not know how many forms will come in (its dynamic number of forms), how can I use this in import process?
Hi @debbiatsafe,
Thank you for your response. Just curious to know, in your AttributeExposer, did you import data as "from feature cache"? If that's the case, when I do not know how many forms will come in (its dynamic number of forms), how can I use this in import process?
Hello @lsugumar
Since my sample dataset was small, I did use the Import from Feature Cache option. Note that it is also possible to import from a dataset or manually input the attribute names (A-Z).
The same Excel output is also possible using a dynamic schema workflow along with the SchemaScanner. If you are unfamiliar with dynamic workflows, I would recommend reviewing these articles on dynamic schemas and using the SchemaScanner. With this workflow, you would want to ensure the correct regular expression is set in the Ignore Attributes Containing parameter for your input data. Attached is an example workspace.