Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Adding an attribute to Rank Items button in Strategic Planning Workspace

Adam Johnson2
Tera Contributor

We have created a custom column on our planning item table which populates the ADO Stack Rank field. In a Portfolio Plan in Strategic Planning Workspace we would like the ability to select Rank Items and rank the planning items based off of this field. 

I am researching to understand what we would need to do in order to enable us to rank by this planning attribute.

Does anyone know the steps we would need to take to add this ability?

 

I have dropped a screenshot of how the Rank button works, but what we currently see and can provide additional context as needed.

Thanks in advance

1 ACCEPTED SOLUTION

VineethDN13
Tera Expert

Hi Adam,

 

sharing what I found while researching this.

 

The Rank Items attribute list in Strategic Planning Workspace is driven by code. Specifically, there’s a function getNumericOrCurrencyFields() in Script Include ItemMetadataDB, which is used by sn_align_ws.ScoringFrameworkSNC. This function returns only Planning Item fields with numeric types: integer, decimal, float, or currency.

 

We tested this by creating a new float field on the Planning Item table, and it started appearing in the Ranking Attributes list.

 

So to enable ranking by a custom attribute (like ADO Stack Rank), the field needs to be a numeric dictionary type on the Planning Item table. If the current field is a string, creating a numeric version and populating it should make it available for ranking.

 

Hope this helps.

 Rank items screenshot.png

View solution in original post

2 REPLIES 2

VineethDN13
Tera Expert

Hi Adam,

 

sharing what I found while researching this.

 

The Rank Items attribute list in Strategic Planning Workspace is driven by code. Specifically, there’s a function getNumericOrCurrencyFields() in Script Include ItemMetadataDB, which is used by sn_align_ws.ScoringFrameworkSNC. This function returns only Planning Item fields with numeric types: integer, decimal, float, or currency.

 

We tested this by creating a new float field on the Planning Item table, and it started appearing in the Ranking Attributes list.

 

So to enable ranking by a custom attribute (like ADO Stack Rank), the field needs to be a numeric dictionary type on the Planning Item table. If the current field is a string, creating a numeric version and populating it should make it available for ranking.

 

Hope this helps.

 Rank items screenshot.png

Adam Johnson2
Tera Contributor

Thanks for the follow up here Vineeth.
You are absolutely correct that the solution we also implemented was creating a numeric field. 
Once we implemented this it did work as expected.