Topic
  • 2 replies
  • Latest Post - ‏2013-05-13T05:13:33Z by Adamarla
Adhithya
Adhithya
1 Post

Pinned topic Reading the value of user created attributes

‏2013-05-11T10:29:21Z |

How to read a user created/defined attribute using DXL script. I have a script like this.

 

Module srcModule=current
Object obj = null
int i=0
string s=null
for obj in srcModule do
{
 if(obj."Object Text" ""!= "")
 {
  if(obj."Absolute Number" ""== "7")
  {
   s=obj."Test Case"
   print s
  }
 }
}

 

But this script does not return the value in the attribute Test Case.

  • llandale
    llandale
    2972 Posts

    Re: Reading the value of user created attributes

    ‏2013-05-11T20:49:56Z  

    Make sure you found the correct object:

    • print "Test Case for Object #" (identifier(obj)) " = [" S "]\n"
    • current = obj
    • refresh(srcModule)
    • break

    -Louie

  • Adamarla
    Adamarla
    75 Posts

    Re: Reading the value of user created attributes

    ‏2013-05-13T05:13:33Z  

    Make sure you have at least read permission to the attribute definition and value.