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: fGetDefVal
Topic Summary:
Created On: 24-Oct-2007 22:55
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.
 24-Oct-2007 22:55
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Browsing old threads, and taking comments from Schröder I now offer the attached function that retrieves the default value of an attribute, if any. The tricky part (solved by Schröder) was retreiving the boolean default value of a boolean attribute, since 'ad.defval' by default gets whether there is a default.

You can test the function by creating 3 boolean attributes in the module [1] b1 has def value 'false' [2] b2 had def value 'true' [3] b3 has no default value.

The way its coded right now it returns 'True' or 'False' with captital letters. If you want lower case 'true' or 'false' then you can remove the comments on that one 'ad.typeName' line, which uses Schröder's solution.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.