Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Ranking the Sharepoint List Items

$
0
0

Hi,

I am having Sharepoint list with the below values

ID         Score             Priority
-------------------------------------
15           40                 Critical
26           43                 High
37           35                 Low
42           35                 Critical
48           50                 Critical
51           35                 Medium
53           40                 Low
59           41                 Medium
64           25                 Low

Now I want to give the ranks for the above list with the below conditions
If the scores are equal then consider priority column.
For example in the above list 35 is repeated 3 times. So first we need to consider the code whose priority in the order as Critical, High, Medium and Low
So I want the output as follows

ID         Score             Priority             Rank
------------------------------------------------------
15           40                 Critical               4
26           43                 High                   2
37           35                 Low                    8
42           35                 Critical                6
48           50                 Critical               1
51           35                 Medium             7
53           40                 Low                     5
59           41                 Medium               3
64           25                 Low                    9

So this need to be happned when I am adding a new item in the list.
So can anyone help me in solve this issue using javascrip. Even it is good if you provided the logic for getting the ranks.

Thanks & Regards,
Kishore


Kishore


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>