Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Dan Hopping, on Wednesday, August 30, 2006 7:23 PM

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"
 30-Aug-2006 17:56
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

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
Report this to a Moderator Report this to a Moderator
 30-Aug-2006 19:08
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 30-Aug-2006 19:11
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

Answer 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"
Report this to a Moderator Report this to a Moderator
 30-Aug-2006 19:22
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.