• 1 reply
  • Latest Post - ‏2012-10-18T16:03:39Z by Champagne
1305 Posts

Pinned topic Saving information for later printing in ReporterPlus

‏2012-07-17T18:24:13Z |
Is there a way in the Q language that I can search through a model and create a list of all Operations, ensuring that there are no duplicates, and then print it later? As kind of a pseudo-example:

Recurse through Model;
if ($metaClass = "Operation") && (match($name, ListOfOperations) =
then ListOfOperations = ListOfOperations + $name;
End Recurse through Model;

Is it possible to also store the information on the operation (description, return, arguments, etc)?

I'm new to ReporterPlus and the lack of documentation/examples for the Q language is frustrating. Thanks for any help ...
Updated on 2012-10-18T16:03:39Z at 2012-10-18T16:03:39Z by Champagne
  • Champagne
    42 Posts

    Re: Saving information for later printing in ReporterPlus

    Hi I don't know if you've found the solution to this yet.
    To get all the operations you can just add a new node to your report and on the iteration tab check the "Iterates" checkbox, for the iteration type select "Class" now you can choose Operation metaclass from the combo box and the report will iterate through all the operations in the model.

    This does a similar thing to the Q language command all.

    In Q to get a collection of all the operations use the following
    all "Operation"

    The iteration loops through these objects and so you can access any of the attributes you have set on those objects.

    There will be no duplications in either of these it will be a simple collection of all the artifacts in the model based on the Operation metaClass.

    Shortly after that you'll get frustrated over the limitations of Q and reporterPLUS, having said that you can achieve some really stunning results within those limitations.

    If you have a specific problem or relationship you are after then just reply, ReporterPLUS can be a little bit of a black art but we love it really (well sort of).