cancel
Showing results for 
Search instead for 
Did you mean: 

How do I insert units of measurement via impex

Former Member
0 Kudos

There are some attributes for products which need an associated unit of measurement which we wish to populate using impex (as there are a very large number of them). The impex for this would be (for instance, in the most basic form possible):

 INSERT_UPDATE Product;code[unique=true];$feature1;$feature2;
 ;012345;1;25;

I would like to be able to add to this impex so that the units for $feature2 are also populated by the script. Is there any way I can do this so that I can set different units for different products? So if the units were distance one could be mm, another could be m and a third could be km?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I've tried to use the delimiter to add in the units but it doesn't appear to populate the UOM fields - the impex will import and other values will work but the UOMs remain unchanged.

Former Member
0 Kudos

Hi Robert - We've recently found that we can only get the UOMs to change if they have an initial value. So if you give them an initial (default) value in the impex that's creating the ClassAttributeAssignments, then when you import your impex, if the UOM is different, it will be changed.

Former Member
0 Kudos

If you dig into ClassificationAttributeTranslator you'll see you need to provide a unit delimiter, which they define as a colon. I don't see a way to override this attribute delimiter, but there is a way to override the collection delimiter. An untested example would be something like this:

 INSERT_UPDATE Product;code[unique=true];$feature1;$feature2;
 ;012345;1:m;25:km;

Hope this helps.

Former Member
0 Kudos

I suspect that you need some sort of Translator that would take something like "15,kg" and convert it to an classification attribute value with unit. Surprisingly I haven't found one in the platform, though.

Former Member
0 Kudos

Thanks for the responses - it looks like Konrad is about right with the question (sorry if I didn't make it clear enough). I need to populate classification attributes with measurements and units of measurement using impex. The actual measurement value is easy enough to import but I can't work out how to import into the units field. I'm pretty sure all that I really need is a variable name to put into the header of my impex but I can't find a reference to it anywhere (a lot of them will appear in mouse-over text in the hmc and product cockpit).