I am using the Requirements Viewpoint. I would like some aql expressions that would make a good label. The expression could contain the Prefix (i.e. the ReqID). The expression could also contain the Name or Long name. I cannot write or interpret aql myself - I can only copy-paste.
Does anyone have some good aql queries which can be used in the Requirement elements?
To customise it, I would first right-click my system under the .aird in the Project Explorer > Requirements Viewpoint > “Configure Requirements’ Labels in Diagram”.
Requirement’s label:
Expression: ??? The one I have is worthless and returns nothing. It would be nice if it said “REQ-123” or “REQ-123 Temperature Control”.
Requirement’s context
Expression: aql:OrderedSet{self.ReqIFLongName, self.ReqIFName, self.ReqIFChapterName, self.ReqIFText}->select(s | s != 'null' and s.size() > 0).prefix('- ')->sep('\n')
This is okay but it doesn’t use line break, and it might be better if there were clearer labels before each value; e.g. something like
Title: Temperature Control
Text: "The System shall maintain each Temperature_Reference_Point within the range specified in ICD-123"
Looking for 1 line of aql which will add labels to a requirements object. I imagine it would be like 50 characters or less. Why would that require a contract with this company?
Totally fair — I just meant to suggest a direction for those not comfortable with AQL or needing more tailored support. I won’t be able to provide a ready-made solution here, but hopefully others in the community can chime in.
I recall a video somewhere, which shows exactly this: Someone writing a short aql expression which adds a label to the requirement object. Cannot for the life of me find it.
You can try these AQL querries. The Long Name (or the Name if the Long Name is empty) will be displayed after the “requirement logo”. The Text will be displayed below.
I can confirm that the ->sep(‘\n’) doesn’t add a line break.
Thanks for mentioning it’s an open bug. Trying to add a line break was going to drive me crazy.