How to add a dropdown/selectbox to service portal approval record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 12:36 PM
Hello,
I have a request to add a dropdown/selectbox to the service portal approval record page. use case would be when an approver is approving a request, they would also like to have a dropdown that they can pick an option. For example, the approver could select from the dropdown "Go do this work" or "put this in the backlog" and then select Approve. Any ideas on this? or other solutions?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 09:22 AM
add something like below to
client script
c.action = function(state, mySelect) {
if(c.data.esignature.e_sig_required) {
var requestParams = {
username: c.data.esignature.username,
userSysId: c.data.esignature.userSysId
};
spUIActionsExecuter.executeFormAction(ESIGNATURE[state], "sysapproval_approver" , c.data.sys_id, [] , "", requestParams).then(function(response) {
});
} else {
c.data.op = state;
c.data.mySelect = mySelect;
c.server.update().then(function() {
if (!c.data.updateID) // update failed
spUtil.addErrorMessage(c.data.actionPreventedMsg);
else
c.data.state = state;
});
}
}
server
if (input && input.op && data.isMine) {
gr.state = input.op;
gr.u_yourfieldname = input.mySelect;
data.updateID = gr.update();
if (GlideStringUtil.nil(data.updateID)) {
// update failed so fetch again for correct values
gr = $sp.getRecord();
}
data.op = "";
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 09:45 AM
Also make sure you add <button type="button" name="approve" class="btn btn-success btn-question" ng-click="c.action('approved', mySelect)">${Approve}</button>
<div class="spacer"></div>
<button type="button" name="reject" class="btn btn-default btn-question" ng-click="c.action('rejected', mySelect)">${Reject}</button>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 10:10 AM
thanks for your help..I am having some trouble getting this to work. i can give access to dev instance as well, if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 12:35 PM
i made these changes but i cant figure out to get the value that they select from the dropdown. any additional help would be appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 01:12 PM
And the "gr.u_yourfieldname = input.mySelect;"
where should that field be created? on the RITM? Or i am missing something?