DXL script to print identifiers of filtered objects

I want to write a script  to print object identifier of filtered objects on the basis of Attribute value.

For example if Attribute  "Status == "high" then print only those requirement identifier which has value High.


almUser - Thu Jul 10 02:24:17 EDT 2014

Re: DXL script to print identifiers of filtered objects
Wolfgang Uhr - Thu Jul 10 05:08:20 EDT 2014

Hi

You can juse "for objWork in entire(mldWork) ..." to loopt through all the objects of an attributes, including all filtered and all deleted objects. They you can get the id fromt that object. The function "object(id, mdlWork)" returns null, if the object is filtered (or deleted).

Best regards

Wolfgang

Re: DXL script to print identifiers of filtered objects
Tony_Goodman - Thu Jul 10 06:40:57 EDT 2014

Module m = current
Object o = null
Filter f = attribute("Status") == "High"
set(m, f)
filtering on
for o in m do print identifier(o) "\n"

Re: DXL script to print identifiers of filtered objects
almUser - Fri Jul 11 06:20:39 EDT 2014

Tony_Goodman - Thu Jul 10 06:40:57 EDT 2014

Module m = current
Object o = null
Filter f = attribute("Status") == "High"
set(m, f)
filtering on
for o in m do print identifier(o) "\n"

Thank you Tony, your script worked like a Charm.

 

Thank you Wolfgang, I would keep your suggestions in mind to avoid including deleted objects.

 

Cheers!

Re: DXL script to print identifiers of filtered objects
Wolfgang Uhr - Fri Jul 11 06:41:44 EDT 2014

almUser - Fri Jul 11 06:20:39 EDT 2014

Thank you Tony, your script worked like a Charm.

 

Thank you Wolfgang, I would keep your suggestions in mind to avoid including deleted objects.

 

Cheers!

Hi

To avoid a deleted object, you have the function isDeleted(..)

Best regards

Wolfgang