Topic
3 replies Latest Post - ‏2014-03-20T20:48:52Z by lokeshchaitanya
lokeshchaitanya
lokeshchaitanya
8 Posts
ACCEPTED ANSWER

Pinned topic How to print the Object heading number along with the attribute

‏2014-03-20T18:39:05Z |

hi i  have written a simple script to check if any of the attributes are not filled or incorrect. But the problem is once  i run the script it is working fine and prinitng all the Obejct ID's along with the message like " Author name is missing, rack number is missing like that.

But i prefer along with this even the Level 1 heading also needs to be printed. Can anyone help me in this regard.

 

 

//DXL script to parse the data.
 
Module m = current
 
Object o = null
 
string oot = ""
string NULL = ""
const string sOutFileName = "c:\\temp\\MyFile.csv" 
Stream out = write sOutFileName
int oid
int Count = 0
 
for o in m do {
 
oot = o."Test Classification"
 
if oot == "Step" then
 {
  oot = o."L4R1 Pass or Fail"
 
  if (oot!= NULL) then 
  {
Count ++
 
    //print  oot
            //Do nothing
  }
  else
  {
oid = o."Absolute Number"
print oid "\t" "Pass/Fail status is not updated for this object ID" "\n"
 
  }
 
 
 
  oot = o."L4R1 Tester Name"
 
  if (oot!= NULL) then 
  {
Count ++
 
    //print  oot
            //Do nothing
  }
  else
  {
oid = o."Absolute Number"
print oid "\t" "Tester Name is not updated for this object ID" "\n"
 
  }
 
  oot = o."L4R1 SW Version"
 
  if (oot!= NULL) then 
  {
Count ++
 
    //print  oot
            //Do nothing
  }
  else
  {
oid = o."Absolute Number"
print oid "\t" "Software version is not updated for this object ID" "\n"
 
  }
 
  oot = o."L4R1 SDU Serial #"
 
  if (oot == "030" or oot == "025" or oot == "022" or oot == "019" or oot == "024" or oot == "009") then 
  {
Count ++
 
    //print  oot
            //Do nothing
  }
  else
  {
oid = o."Absolute Number"
print oid "\t" "SDU serial # is not updated for this object ID" "\n"
 
  }
 
  oot = o."L4R1 RACK #"
 
  if (oot == "3" or oot == "4" or oot == "5" or oot == "6" or oot == "7" or oot == "8" ) then 
  {
Count ++
 
    //print  oot
            //Do nothing
  }
  else
  {
oid = o."Absolute Number"
print oid "\t" "RACK # is not updated for this object ID" "\n"
 
  }
 
   }
}
 
  • lokeshchaitanya
    lokeshchaitanya
    8 Posts
    ACCEPTED ANSWER

    Re: How to print the Object heading number along with the attribute

    ‏2014-03-20T19:05:03Z  in response to lokeshchaitanya

    Can anyone please help me in this regard

    • Mike.Scharnow
      Mike.Scharnow
      145 Posts
      ACCEPTED ANSWER

      Re: How to print the Object heading number along with the attribute

      ‏2014-03-20T20:16:10Z  in response to lokeshchaitanya

      Hi Lokesh,

      Bumping after 26 minutes? This seems to be extreeeemely urgent...

      Well, you might want to use the function

       

      Vertical navigation

      Declaration

      Object parent(Object 
      o) 
      Operation
      

       

      parent
      returns the parent of object

      and use a loop like

      Object oPar = o
      while (!null parent (oPar)) { oPar = parent (oPar)}
      print number (oPar) "-" oPar."Object Heading" ""

      Best regards,
      Mike