cancel
Showing results for 
Search instead for 
Did you mean: 

how to insert an enum attribute through impex?

Former Member
0 Kudos
 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can insert a value in a Hybris Enum with

 INSERT_UPDATE YourEnumType; code[unique = true]; name[lang = en];
 ; ENUMCODE       ; your value
Former Member
0 Kudos

Thanks for the reply , but what if we are using enum as an attribute in a header statement with another regular parameters?

Ex: INSERT_UPDATE myData; name(string); status(enum);phone(long) .....?

Former Member
0 Kudos

You have to pass the code of the enum you want to set

 INSERT_UPDATE myData; name(string); status(code);phone(long) 

But the enum entry has to exist other wise you have to create it first with the impex code in my first post.

Former Member
0 Kudos

Yes, It worked. Thanks for the answer :)

Answers (1)

Answers (1)

Former Member

Hi Shantanu,

You can achieve that by using this syntax:

  INSERT_UPDATE myData; name[unique=true]; status(code);phone
 ;name;enumCode;123456789

You can find more examples and documentation here: https://help.hybris.com/6.1.0/hcd/8bef9530866910148e6cff59d9afa127.html

Former Member
0 Kudos

Yes, It worked. Thanks for the answer :)