cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Can I use concat in impex to get 2 fields combined in the export csv file

0 Likes
1,337

I have 2 fields - firstname and last name and I need to get these 2 fields concatinated and get in single field in the impex export script.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

You can use a velocityTranslator :

INSERT_UPDATE YOUR_MODEL;@concatField1AndField2[translator=de.hybris.platform.impex.jalo.translators.VelocityTranslator, expr='$item.field1 $item.field2']

Hope this will help

arvind-kumar_avinash
Active Contributor
0 Likes

Can you elaborate it using some example that one can execute in hAC and validate? e.g. the following export script:

 INSERT_UPDATE Product;@concatField1AndField2[translator=de.hybris.platform.impex.jalo.translators.VelocityTranslator, expr='$Product.ean $Product.approvalStatus']

will export something like:

 # @concatField1AndField2
 $Product.ean $Product.approvalStatus
 $Product.ean $Product.approvalStatus

All the value rows will be filled with $Product.ean $Product.approvalStatus instead of the actual value of ean and approvalStatus