Related lists and reference qualifiers

Whenever you edit a reference field from a related list, it might be necessary to know which related list the reference field is on in order to properly build the reference qualifier for the field.

This occurs when the same field appears on different related lists and the context is necessary to know how to properly qualify the reference values.

To do this, configure the list control for the related list and fill in the List edit tag with any tag you choose. This tag value will be available to the advanced reference qualifier function as a variable named listEditRefQualTag. For example, your advanced reference qualifier script include can look like this:
// 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 editing// 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"