Sometimes, when using the Remedy Developer Studio, you need to locate some object. The search capabilities of Remedy Developer Studio are very constrained and sometimes you are forced to review a high number of objects to find the correct one.
In this post I will show you an alternative method to find objects.
The developer studio can perform searches of objects (like filters or forms) based in one search criteria. But the are some search conditions that are not included, and also you can’t combine more than one condition to reduce the result set. For instance, imagine the next questions, that can’t be answered from developer studio:
- The list of forms that include “:HPL:” in the name and are part of Change application.
- The list of shared filters that are associated with a form.
- The list of active fields that depends on a field for computing a qualification.
- The list of filters that perform a set operation over a field.
- The list of filters that perform a push operation over a particular form.
None of the above questions can be answered from Remedy Developer Studio.
But the information is in the metadata, so… how can we dig it?
The Remedy data dictionary
I won’t explain the Remedy data dictionary in detail. You can read the ARS database reference guide to get a deeper detail. But I can show you how can you dive in the information and get your results.
All Remedy objects are stored in tables at the database. So if you know these tables, you can create amazing object searchers. All these tables are mapped to view forms at the standard Remedy installation. You can find them by the name, where all forms starts with “AR System metadata: ” continuing with the name of the table.
These forms are semi-protected and a user can’t access the data when directly accessing them from a client. This protection is easy to eliminate, but I don’t recommend it, since you are customizing a core form. Instead of it, you can create join forms based on those view forms, preserving the original forms untouched.
The first table is ARSCHEMA that contains all the forms in your system. As said, this table is mapped to the form “AR System metadata: arschema”. Two fields are the most important:
- Name: The name of the form.
- SchemaId: An identification number of the form.
The SchemaId is very important, since it is used for database references. So if we want to create a join form between the arschema and another object, the SchemaId field will be the one to use at the join qualification.
The next table is ACTLINK that contains the complete list of active links. The most important fields:
- ActLinkId: An identification number of the Active Link.
- FieldId: Field Id number that is included in the execution options.
- Name: The active link name.
To relate Active Links with tables, there is the table ACTLINK_MAPPING. That relates the SchemaId and ActLinkId, including shared workflow. This is very important, since Remedy Developer Studio bases searches on main forms, not secondary forms. But this relationship reports us about all related forms, main and secondary.
To take profit we must create a join form that relates arschema, actlink and actlink_mapping. Since join forms can only join two forms, we must use two join forms:
- “AR System metadata: actlink_actlink_mapping” joins forms “AR System metadata: actlink” and “AR System metadata: actlink_mapping” using field ActLinkId of both forms. We must include the FieldId and Name fields form the actlink and SchemaId from the actlink_mapping form.
- “AR System metadata: actlink_actlink_mapping_arschema” joins the previously created join form with “AR System metadata: archema” using field SchemaId of both forms. We must include the FieldId and Name fields form the actlink form and Name from the archema.
So right now, we can use this form to show all fields of a form by making a basic search.
This active link searcher can be upgraded in a lot of ways. You can create a menu based on arschema to easy the task of selecting a form. Or you can also join the field form to make searches based on the field name.
And know my question arises… This tool is very helpful (I use it almost every time I perform reverse engineering), and very easy to do. So why doesn’t BMC provide it with the Developer Studio?