![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Importing csv file with an enum attribute Topic Summary: How do import a multi valued enum attribute from a csv file? Created On: 30-Aug-2006 17:56 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Multi-valued enumerated attributes can be imported usinf csv importer but you must enclose all of the enumerated strings inside quotes. Each of the enumerated values must be seperated by a CRLF but not a comma. In the following csv file... Assume your module has "Applies to" as an enumerated type with three choices If you import the following Example csv file... Object 1 will have 'Applies to' set to all three values, Object 2 will set 'Applies to' to values "Enum Choice 1" & "Enum Choice 3" and Object 3 set 'Applies to' to the value "Enum Choice 1" only. --------------------- Example csv file... "Absolute Number","Applies to" 1,"Enum Choice 1 Enum Choice 2 Enum Choice 3" 2,"Enum Choice 1 Enum Choice 3" 3,"Enum Choice 1" | |
![]() |
|
I can't seem to get my csv file formatted in such a way that the import script will accept the multiple values I want to assign to a multi-valued enum attribute.
Any help is greatly appriciated! Heather. ------------------------- Heather Linsk Lead Engineer General Dynamics AIS 413-494-7095 |
|
![]() |
|
![]() |
|
Writing this from memory: your problem is that the importer expects new-line characters between the enumerated values; yet CSV format would interpret that as a new row in the table.
In excel you can force a new-line characters into a cell by using alt-Enter. I don't think you can do that in the replace box and will need to be done manually. Then save as type csv and see how it works. CSV should enclose the entire cell in quotes and would therefore know these new-lines are inside a cell and don't mark a new row. - Louie |
|
![]() |
|
![]() |
|
Multi-valued enumerated attributes can be imported usinf csv importer but you must enclose all of the enumerated strings inside quotes. Each of the enumerated values must be seperated by a CRLF but not a comma.
In the following csv file... Assume your module has "Applies to" as an enumerated type with three choices If you import the following Example csv file... Object 1 will have 'Applies to' set to all three values, Object 2 will set 'Applies to' to values "Enum Choice 1" & "Enum Choice 3" and Object 3 set 'Applies to' to the value "Enum Choice 1" only. --------------------- Example csv file... "Absolute Number","Applies to" 1,"Enum Choice 1 Enum Choice 2 Enum Choice 3" 2,"Enum Choice 1 Enum Choice 3" 3,"Enum Choice 1" |
|
![]() |
|
![]() |
|
Thanks Dan.
I found another way and that was to separate each value with a CR followed by LF. ------------------------- Heather Linsk Lead Engineer General Dynamics AIS 413-494-7095 |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.