Home Analyst Portal

Username in userpicker

Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
Hi.

Can you add username in the userpicker? like in the consle "John Smith (JOSM0314)"
if you type for EX John Smith and get back a result of 10 John Smith how do you know wich one you want?

We have a support group where most of the people calling dont know their username.

Answers

  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Hi Magnus,
    I can't give you the username, but I can give you the email address if that helps?



    You can add the username by adding the ExtraProps attribute on the userpicker in the form:
    { DataType: "UserPicker", PropertyDisplayName: "AffectedUser", PropertyName: "RequestedWorkItem", ExtraProps: "UserName" },

    To get the email address. add this to custom.js:
    app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {<br>    formObj.boundReady(function() {<br>		$('input.input-userpicker').data('kendoAutoComplete').setOptions({template: "#: data.Name # (#: data.Email#)"});<br>	});<br>});

    NB: This will only work from version 8.2.0 or later. The email address was added to support the @mention functionality.

  • Ben_TeyBen_Tey Partner Adept IT Monkey ✭✭

    @john_doyle , may i have the email address script for custom.js ?

    app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
    

    I only can single first line as above.

Sign In or Register to comment.