• 1 reply
  • Latest Post - ‏2013-05-17T05:26:32Z by Johnny_P
7 Posts

Pinned topic Identifier

‏2013-05-16T21:40:19Z |

The below code works for one identifier but not multiple...I don't understand why.  If you could respond with a concise answer that would be great.  It's been a while since I've had to work with dxl.

The below is the code.

Module m = current
Object o
int objectCount = 0
int deletedObjectCount = 0
string id
id = identifier(o)

for o in entire m do {
    if (!isDeleted(o){
        if ((id == "LETH-563") || (id == "LETH-564")){
        o."Requirement Status"="Recommend for Deletion"""
        print "found a requirement and updated it" "\n"

print "Module " name(m)"" " Object Counts:\n"
print "Total number of objects = " objectCount ".\n"
print "Number of deleted objects = " deletedObjectCount ".\n"

Updated on 2013-05-16T21:40:41Z at 2013-05-16T21:40:41Z by bellincm
  • Johnny_P
    25 Posts

    Re: Identifier


    This line:

    id = identifier(o)

    has to go in your "for o in m" loop. Otherwise you're assigning the id of the first object and never change it.