Hello, I want to show the attributes that a requirement has in the text. I have the requirement’s attributes imported correctly but I can’t find the aql expression that call those attributes. Let’s say I have an attribute called ‘Number of hours’ and I want to show it in the text, this would be my expression for it:
Hi,
I try somethink with my Requirements Preference (forget the end of the script which is for showing the reqIfName). It seems to work but I have only One StringValueAttribute. I am not sure that it works if you have several StringValueDefinition. It looks like that:
Hi David, it worked for one of the attributes that was a string, I think it might not work on all because the others are enumerations, but this allowed me to work around.
Thank you for the help!!
This didn’t work for me.
In the Requirements Viewpoint menu "Configure Requirement’s Labels in Diagrams’ I put your expression in the Requirement’s label ‘expression’ field (prefaced with “aql:”):
That should do the trick (your expression was only getting requirements of types enum):
aql:self.ownedAttributes->collect(a | let v = if a.oclIsKindOf(Requirements::EnumerationValueAttribute) then a.values.ReqIFLongName else a.value.toString() endif in '- ’ + v)