Human Capital Management Blogs by SAP
Get insider info on HCM solutions for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
ChrisStiles
Product and Topic Expert
Product and Topic Expert

For customers who have migrated to Talent Intelligence Hub (TIH), you'll notice a few changes in the LMS Administration Interface.  I won't go over all of the changes, but one in particular caught my eye.  When you search for Attributes, you can filter you search criteria by Attribute Type.  That's great!  However, in the search results, you get only the Attribute Type ID back, but not the Attribute Type Name.  The ID is relatively meaningless, and to most LMS administrators, previously unknown, so it would be helpful to have the attribute Type Name as well.  The screenshot below shows what the Attribute Search looks like before our modification.  Note the ID is shown, but what is Attribute Type 1 and 2?  A Skill?  A Competency?  An Aspiration?  Some other custom attribute type added to TIH?

 

ChrisStiles_3-1706548841536.png

 

Before we get started, I'll reiterate some disclosures I always have when applying any custom code to LMS.

  1. Custom code added to LMS is not supported via the normal support channels/ticketing process.  
  2. Custom code could be impacted by any future release/patch applied to the product (in this case LMS)

The great news here is that if the search selector does break, or isn't working, the default (working and fully supported) version of all search selectors are available via the LMS Administrator user interface.  (I'll show you where later!)

That's the big scary part, so if you're still with me, let's get started. 

Navigate to SuccessFactors Learning Administration (by whatever means you typically get there).  Once there, drill down the left have navigation to System Administration --> Configuration --> Search Selectors

Locate the "Attribute" search selector, and select the Edit icon.  You may need to page through a couple times, or show more results on each page, but, (*insert best Obi-Wan voice here*), this is the Search Selector you are looking for! 

ChrisStiles_1-1706547689259.png

When you click the edit icon, you'll be presented with a large box full of code that looks like this:

ChrisStiles_2-1706547964542.png

Scroll down roughly 25 (ish) lines, until you find the main SQL clause.  It should look like this:

 

 

selectClause.mainSqlClause=attb.EXTERNAL_ID, attb.CPTY_ID, attb.CPTY_DESC, attype.EXTERNAL_TYPE_ID, attb.NOTACTIVE, attb.DMN_ID, attb.CPTY_CATEGORY_ID

 

 

On the right hand side of that equation, you'll see that we selected several fields, including the EXTERNAL_TYPE_ID.  However, what lacks is the EXTERNAL_TYPE_NAME.  Let's add that in.  You may so so anywhere on the right hand side of the "=" sign, so long as you maintain the commas in between each field.  I like keeping similar fields together, so I put it immediately after the ID field.  Thus, my main SQL clause looks like this after the modification:

 

selectClause.mainSqlClause=attb.EXTERNAL_ID, attb.CPTY_ID, attb.CPTY_DESC,  attype.EXTERNAL_TYPE_ID, attype.EXTERNAL_TYPE_NAME, attb.NOTACTIVE, attb.DMN_ID, attb.CPTY_CATEGORY_ID

 

Next, we need to create an object to store the data in (for lack of a better way to describe what these three lines of code do).  Scroll down until you find several lines of code that start with "selectClause.attributes.".  Insert the following:

 

selectClause.attributes.attributeTypeName.enabled=true
selectClause.attributes.attributeTypeName.type=string
selectClause.attributes.attributeTypeName.fieldName=EXTERNAL_TYPE_NAME

 

This tells LMS that the field is enabled, is a string (seriously of alpha-numeric values), and the data comes from the EXTERNAL_TYPE_NAME field we added in the main SQL clause.

So far, all we've really done is pulled a new field out of the LMS.  Now, we need to display it in the search results (thus solving our original dilemma).

Scroll down until you find a series of lines that start with "searchResultColumns.".  Copy/Paste in these lines:

 

searchResultColumns.attributeTypeName.enabled=true
searchResultColumns.attributeTypeName.order=4.0
searchResultColumns.attributeTypeName.columnID=EXTERNAL_TYPE_NAME
searchResultColumns.attributeTypeName.attributeRefID=attributeTypeName
searchResultColumns.attributeTypeName.labelID=Attribute Type Name
searchResultColumns.attributeTypeName.i18nFormatDataType=Label-String
searchResultColumns.attributeTypeName.width=50
searchResultColumns.attributeTypeName.visibilityType=
searchResultColumns.attributeTypeName.orderbyOptionRef=

 

Lastly, click Apply Changes !

Go try and search for attributes now .. it should look something like this: (you may need to tell it to show the new field using the Field Chooser):

ChrisStiles_0-1706552253667.png

 

If you are uncomfortable inserting bits of code as described above, I've included the WHOLE Attribute Search selector attached to this article.

Now - what if things go badly?  Not to worry!  LMS has a link on each search selector, labelled "View Configuration Changes".  Clicking this link will pop open a new window, and show the default code.  Copy & Paste that back in, overwriting anything that is there, and you'll be set back to "factory default".

In summary, we've described teh gap we are solving for, supplied the step by step instructions on how to close that gap, and provided instructions on how to revert back to factory should anything go wrong!

All the best to those who are moving forward with this!  

SAP SuccessFactors Learning 

2 Comments