如何根据另一个属性的值创建DOORS DXL属性?

时间:2014-05-07 18:55:05

标签: scripting ibm-doors

X和Requirement是现有属性。

我想创建一个属性Z,对于给定的对象, 如果Requirement = True,则Z = {属性X的值}, 但如果Requirement = False,则Z = {Object Heading and Object Text}。

制作此属性的DXL是什么? 感谢。

1 个答案:

答案 0 :(得分:0)

This is untested code but try something like this: (assuming attribute z exists as text)

Module m = current
Object o


for o in m do
{
   if ((o."Requirement") == "true")
   {
       o."z" = o."x" ""
   }
   else   // requirement = false
   {
       o."z" = o."Object Heading" "\n" o."Object Text" ""

   }
}