6 Replies Latest reply on Jul 11, 2018 8:56 AM by LJ LongWing

    Internal Qualifier Conversion


      Is there a way to convert the convert the value of the Qualification field in the AR System Searches form into a string?
      For eg:

      The Qualification field value is 1/536870922/18/Building Materials

      I need it to be converted to something descriptive like Department=" Building Materials".


        • 1. Re: Internal Qualifier Conversion

          Look at the DecodeQualifier and FormatQualification methods in BMC.ARSystem.Server class of the AR .NET API.  Similar facility is available within Java API too -- ARServerUser class has the methods such as decodeQualification, formatQualification are of interest to you. As the names indicate, first function allows you to decode an internal representation (string) into an appropriate qualification object; second function then allows you to produce a formatted representation (string) using this object.

          If you are looking for workflow based solution, please look at the AR System Special Run Process Application Commands -- specifically
              Application-Format-Qual "<form>" <internal_qualifier>

          Finally if you're looking for this functionality in a C API client, unfortunately you're out of luck at least AFAIAK. You can decode the qualification (ARDecodeQualification), you can parse a readable/formatted qualification string into object (ARLoadARQualifierStruct); but you cannot produce a formatted string representation usign the API. You have to walk the qualification object and produce the string yourself recursively.


          • 2. Re: Internal Qualifier Conversion



            when I have created such a conversion class in java where is the location for this class on the ARServer?


            Thanks for advice

            • 3. Re: Internal Qualifier Conversion

              Have a look at the special Run Processes in the help/documentation there is some stuff there

              • 4. Re: Internal Qualifier Conversion

                I have attached a def file for a simple conversion tool I built. It will convert from String to Internal Rep and vice versa.


                Basically, it is a Active Link that executes a Service Filter and maps the output using Application-Parse-Qual and Application-Format-Qual based on form selection. Very straight forward.


                (I realize this question is almost 4 years old, but it might be helpful for future queries on the topic)





                • 5. Re: Internal Qualifier Conversion
                  Sowmiya Velayudam



                  I just checked the Parse qualifications using this tool.


                  But the clarification i need is, in workflow in one of our scenario for change calendar,the converstion is missing the brackets. The requirement is to retain the brackets after parsing. Could you please clarify?


                  /* Wed Jul 11 2018 10:03:19.2580 */ Application-Parse-Qual-L "CHG:Infrastructure Change" "" (('Status*' > "Scheduled For Review" AND 'Status*' < "Cancelled") OR ('Coordinator Group' = "Service Tools" AND ('Status*' >= "Draft" AND 'Status*' < "Cancelled")))

                         /* Wed Jul 11 2018 10:03:19.5620 */ Exit code: 0  Value: 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\

                                       Qualification (500182000) = 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\

                                 1 : Set Fields

                         /* Wed Jul 11 2018 10:03:19.5630 */ Application-Format-Qual "CHG:Infrastructure Change" 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\

                         /* Wed Jul 11 2018 10:03:19.5740 */ Exit code: 0  Value: 'Change Request Status' > "Scheduled For Review" AND 'Change Request Status' < "Cancelled" OR 'ASGRP' = "Service Tools" AND 'Change Request Status' >= "Draft" AND 'Change Request Status' < "Cancelled"

                                       Qualification (500182000) = 'Change Request Status' > "Scheduled For Review" AND 'Change Request Status' < "Cancelled" OR 'ASGRP' = "Service Tools" AND 'Change Request Status' >= "Draft" AND 'Change Request Status' < "Cancelled"

                  • 6. Re: Internal Qualifier Conversion
                    LJ LongWing


                    I agree, if you are passing one in you should get the same boolean statement back out the other end, but aren't....so I would recommend you open a ticket with BMC to have it fixed because you definitely aren't getting out what you put in