Friday 4 September 2015

How to set Optionset Value dynamically Using Scriptlet in Unified Service desk--Unified Service Desk (USD)

1. To set Option Set value Dynamically We need to Create A Scriptlet.



2. get Option set Values from field .



As the same way get all the values for remaining options too.


function getcomplintype() {

   //Get the text value from Replacement  parameters or pass text value
    var val = "[[$Scriptlet.getsubject]+]"
    //var val="option1"

    if (val != "") {
        if (val == "option1") {

            return 839540000;
        }

        else if (val == "option1") {
            return 839540001;
        }
        else if (val == "option1") {
            return 839540002;
        }

        else if (val == "option1") {
            return 839540003;
        }

        else if (val == "option1") {
            return 839540004;
        }
        else if (val == "option1") {
            return 839540005;
        }
        else if (val == "option1") {
            return 839540006;
        }

        else {
            return "";
        }
    }
}
getcomplintype();


2.Pass the Integer value to option Set


1 comment: