Lookup field set to userprofile

Forums SPJS-Lookup Lookup field set to userprofile

Viewing 1 reply thread
  • Author
    Posts
    • #12879
      Ally
      Participant

      Hello Alex,

      We have a dropdown field called “Employee”, it a lookup field from a separate list (Employee List). When a new hire upload a document, it take them to a new dialog, they must select their name from the dropdown field in order to keep a record of the document in the employee profile. We like to know if there a way in dffs to auto-selected the employee name (without having to find their name from the dropdown list), and still be able to keep a record of the documents in their profile?

      We know how to set userprofile for people or group, but we don’t know how to set it from a lookup field.

      Thanks in advance!

    • #12918
      Alexander Bautz
      Keymaster

      Hi,
      It depends how the name is displayed in the lookup field – is it pulled from a free text field?

      If it is 100% certain it is the same format as the “Display name” in the user info list you can use something like this in the custom js:

      var ui = spjs.utility.userInfo(_spPageContextInfo.userId);
      setFieldValue("Employee",ui.Title);

      Let me know how this works out.

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.