Related lists and reference qualifiers

To properly build a reference qualifier from a reference field on a related list, it might be necessary to know which related list the reference field is on. When the same field appears on different related lists, the context is necessary to know how to properly qualify the reference values.

In this situation, configure the list control for the related list and enter a tag in the List edit tag field. This tag value is available to the advanced reference qualifier function as a variable named listEditRefQualTag. The following script include code is an example of an advanced reference qualifier using tags.
// Advanced reference qualifier on the CI Relationship Child field that takes into account
// the related list that we are editing the child field on, if the field is being edited
// from a tagged related list. 
  if(listEditRefQualTag =="application")return"sys_class_name = cmdb_ci_appl";
  if(listEditRefQualTag =="database")return"sys_class_name = cmdb_ci_database"