Brett Ross

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Approval Status Field Showing #20063
    Brett Ross
    Participant

    The list is just a custom list with Content Approval turned on. But your jQuery code worked perfectly. Thank you!

    in reply to: DFFS > Filtering Checkbox based on another field answer #19931
    Brett Ross
    Participant

    How would you do this if ChoiceColumn3 is a drop-down rather than a checkbox?

    in reply to: Pull user info from a people picker #19220
    Brett Ross
    Participant

    Nevermind. I see my mistake.

    in reply to: Pull user info from a people picker #19218
    Brett Ross
    Participant

    I’ve had this working since July, and all of a sudden now, it’s no longer working. I’m pulling in the Contract Manager’s work phone number from the user profiles. Here’s my code.

    $.each(spjs.utility.getFieldValue({“fin”:”Contract_x0020_Manager”,”key”:”loginName”}),function(i,login){
    var ppData = spjs.utility.userInfo(login);
    console.log(ppData);

    var userProfile = spjs.utility.userProfile(login);
    console.log(userProfile);
    setFieldValue(“CM_x0020_Phone_x0020_Number”,userProfile.WorkPhone);
    });

    I’ve also tried wrapping it in a function, then writing a rule that says, any time the Contract Manager field changes, run the function. But that doesn’t work either.

    function PopulatePhone ()
    {
    $.each(spjs.utility.getFieldValue({“fin”:”Contract_x0020_Manager”,”key”:”loginName”}),function(i,login){
    var ppData = spjs.utility.userInfo(login);
    console.log(ppData);
    // User profile is not available in SP Foundation
    var userProfile = spjs.utility.userProfile(login);
    console.log(userProfile);
    setFieldValue(“CM_x0020_Phone_x0020_Number”,userProfile.name_of_property);
    });
    }

    in reply to: Pull user info from a people picker #17488
    Brett Ross
    Participant

    I’m not a programmer, so I need a little more instruction. I’ve added this to the Custom JS textarea and changed PeoplePicker1 to my field name. But how do I tell it what field to populate? And how do I change it if I want to pull in other properties like the phone number?

    • This reply was modified 4 years, 2 months ago by Brett Ross.
Viewing 5 posts - 1 through 5 (of 5 total)