1

I'm trying to do some automated scoring based on the values of a Choice field.

The user can select more than one value. I need to SUM all the points for the various choices made by the user.

Column name is Project

Choice values are Widgets1, Widgets2 and Widgets3

The scoring is based on the choice of widgets:

Widgets1 is 10 points

Widgets2 is 25 points

Widgets3 is 50 points

If Widgets1 and Widgets3 are selected, the score is 60

If Widgets2 and Widgets3 are selected, the score is 75 and so on...

Struggling with syntax on this one. Any help would be most appreciated.

(Thanks @mike-smith-mct-mvp for helping me with a similar post previously)

1

SharePoint Calculated columns cannot work with multi-valued columns. You can replace this column with three Yes/No (checkbox) columns and then write a formula against them, or you can create a SharePoint 2013-style workflow that takes the multi-valued column into a dictionary variable and then writes the values back into three columns that a formula can access.

0

We can create a number column named "Score", then add the code below into a script editor web part into new/edit form page.

<script src="//code.jquery.com/jquery-3.3.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function PreSaveItem(){
    var score=0;
    if($("input[aria-label='Project Widgets1']").is(":checked")){
        score+=10;
    }
    if($("input[aria-label='Project Widgets2']").is(":checked")){
        score+=25;
    }
    if($("input[aria-label='Project Widgets3']").is(":checked")){
        score+=50;
    }
    $("input[title='Score']").val(score);
    return true;
}
</script>

enter image description here

  • Apologies for the very late reply. Unexpectedly out for several weeks. I will give this a shot. Thanks... – Paul Alvarez Oct 11 '18 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.