Loop including deleted items

Hi all.

I'm trying to get a list of all deleted modules in a project. Is this possible in DXL?
All loops I've tried just ignore deleted items.
Thanks in advance for any help or advice,
Michael
MichaelGeorg - Thu Mar 29 10:38:25 EDT 2012

Re: Loop including deleted items
bmij - Thu Mar 29 11:26:06 EDT 2012

This is part of some code I've used:
 

for itemRef in all(fldr) do {
 
    isDel = isDeleted(itemRef)
        if( isDel ){
                str2 = " DELETED "
        } else {
                str2 = ""
        }
        str1 = name(itemRef)
        print str1 "  "
        if (project( str1 )){
                print "is a " str2 "project\n"
        }else{
                if (folder( str1 )){
                print "is a " str2 "folder\n"
                }
        }
        if (module( str1 )){
                print "is a " str2 "module\n"
        }
 
}

 


Note that the looping perm is for folders not projects. This perm is not iterative so you'd have to code that.

Jim

 

Re: Loop including deleted items
MichaelGeorg - Fri Mar 30 08:18:58 EDT 2012

bmij - Thu Mar 29 11:26:06 EDT 2012

This is part of some code I've used:
 

for itemRef in all(fldr) do {
 
    isDel = isDeleted(itemRef)
        if( isDel ){
                str2 = " DELETED "
        } else {
                str2 = ""
        }
        str1 = name(itemRef)
        print str1 "  "
        if (project( str1 )){
                print "is a " str2 "project\n"
        }else{
                if (folder( str1 )){
                print "is a " str2 "folder\n"
                }
        }
        if (module( str1 )){
                print "is a " str2 "module\n"
        }
 
}

 


Note that the looping perm is for folders not projects. This perm is not iterative so you'd have to code that.

Jim

 

Interesting that you can specify "all" in loops over a folder but not in loops over a project.

Thanks a lot Jim!

Re: Loop including deleted items
kasiaz - Tue May 13 08:13:22 EDT 2014

bmij - Thu Mar 29 11:26:06 EDT 2012

This is part of some code I've used:
 

for itemRef in all(fldr) do {
 
    isDel = isDeleted(itemRef)
        if( isDel ){
                str2 = " DELETED "
        } else {
                str2 = ""
        }
        str1 = name(itemRef)
        print str1 "  "
        if (project( str1 )){
                print "is a " str2 "project\n"
        }else{
                if (folder( str1 )){
                print "is a " str2 "folder\n"
                }
        }
        if (module( str1 )){
                print "is a " str2 "module\n"
        }
 
}

 


Note that the looping perm is for folders not projects. This perm is not iterative so you'd have to code that.

Jim

 

Hello,

I would like to list the soft deleted items from a folder. But i ahve a problem. There are some items under a folder which is already soft deleted. So my question is: is it possible to list down the soft deleted Folders ?

Any help would be greatful.

Thanks & Regards,

Kasilingam S

Re: Loop including deleted items
adevicq - Tue May 13 08:50:19 EDT 2014

kasiaz - Tue May 13 08:13:22 EDT 2014

Hello,

I would like to list the soft deleted items from a folder. But i ahve a problem. There are some items under a folder which is already soft deleted. So my question is: is it possible to list down the soft deleted Folders ?

Any help would be greatful.

Thanks & Regards,

Kasilingam S

Hi,

Yes it is possible:

Item f = item(fullName(current Folder))

void list(Item wF) {
    Item i 

 print type(wF) " (" isDeleted(wF) ")\n"
 if (type(wF) != "Folder" && type(wF) != "Project") {
  return
 }
 Folder f = folder(fullName(wF))
 for i in all f do {
  print " - " name(i) " (" isDeleted(i) ")\n"
  list(i)
 }
}

list(f)

Regards,

Alain