We are not sure that we understand correctly what you want to do with provided expression, since it would assign 3 column for all values from .csv column 2. It would be easier to simply assign .csv column 3 to each attribute at Assign Attributes step.
In case you meant something else, please provide us with the file and more details about conditions for your expression, so we could check it for you and provide you with possible solution
Waiting to hear from you
Aug 13, 2013
The csv is laid out with one attribute per line as follows:
ProductID - AttributeName - Attribute Value
066598 - Product Type - Laptop
066598 - Marketing - Really good Laptop
066598 - Barcode - 0123456789
I have the expression:
IF([CSV_COL(2)] = "Product Type", [CSV_COL(3)], "");
In the left hand table attached to the "Product Type" Attribute
IF([CSV_COL(2)] = "Marketing", [CSV_COL(3)], "");
Is attached to the Marketing attribute and so on.
When I run these expressions the new sheet it produces is as follows:
What I'm looking for is a line of code that I can copy and paste for every attribute.
Ideally it would be useful to combine them in a single row:
ProductID - Product Type - Marketing - Barcode
066598 - Laptop - Really good laptop - 0123456789
Thank you for you input.
Aug 14, 2013
Thank you for your interest.
There is no way to use single code that would parse all your attributes automatically, but you can create case with all conditions and use the same expression for all attributes. For example:
WHEN [CSV_COL(2)] = "Product Type" THEN [CSV_COL(3)]
WHEN [CSV_COL(2)] = "Marketing" THEN [CSV_COL(3)]
Yes, it would be easier if you could convert your file to single row, in this case Store Manager would assign all Attributes to your database fields automatically.