![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Current Attribute Topic Summary: Created On: 20-Dec-2006 13:34 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: I figured out the skip list approach before I gould the output string approach. Just to close the loop, here's what I went with: string data Skip var = createString() if(matches("Jason McMan", obj."Name" "")) { put (var, "Yes", "xx") for data in var do { if((string key var)!=null) { displayRich "Jason McMan is here" } delete var } }
| |
![]() |
|
I'm using a code piece that looks like:
if(matches("Jason McMan\n", obj."Name" "")) { displayRich "Jason McMan is here." } But, if Attribute "Name" contains ['Jason McMan" newline "Jason McManson" newline "Jason McMan"], then the above code will return "Jason McMan is here" twice. How can I check to make sure that if "Jason McMan" has already been returned, it won't return it a second time? The attribute is one I created from the Analysis Wizard, so I don't think its a '"real" attribute (and I have no idea what the name of it is either). I want to go with something like this: if((matches("Jason McMan\n", obj."Name" "")) && (!matches("Jason McMan is here", *****))) { displayRich "Jason McMan is here." } where "*****" is the attribute I am writing all this code for. Any help with this syntax? Thanks, Mike |
|
![]() |
|
![]() |
|
One approach is to build a skip list -- then
display skiplist by iterating thru the skiplist |
|
![]() |
|
![]() |
|
Is it possible to just do a "!matches" in the attribute? Is there something I can replace "****" with to do that? I guess I'm leaning toward this method because this is how I always did it in VB. |
|
![]() |
|
![]() |
|
You can also build an output string -- and check for a matches in the output string before adding to the output string --
then display output string |
|
![]() |
|
![]() |
|
Ron, the "output string" solution looks like a winner to me. Can you give me a sample of the code?
Here's my shot: Buffer result = create () if((matches("Jason McMan\n", obj."Name" "")) && (!matches("Jason McMan is here", result))) { set(result, result"\nJason McMan is here") //Is this how I can set result = result + "\n" + "Jason McMan is here"? { displayRich (tempStringOf result) } } delete result |
|
![]() |
|
![]() |
|
I figured out the skip list approach before I gould the output string approach.
Just to close the loop, here's what I went with: string data Skip var = createString() if(matches("Jason McMan", obj."Name" "")) { put (var, "Yes", "xx") for data in var do { if((string key var)!=null) { displayRich "Jason McMan is here" } delete var } }
|
|
![]() |
Telelogic DOORS
» General Discussion
»
Current Attribute
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.