Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Obtaining the value of a Look Up column

$
0
0
Marc,

My apologies, great suggestion. Misunderstood from my end. You're right, getting the ID is absolutely key, and actually using just the ID alone works perfectly well.

A content query web part pulled through the people and their IDs.
A variable was created to look at the people container where the title matched on the value entered into the text field and pull through the ID attribute. This variable was then used to populate the value field.

An additional thanks to front end guru Leigh Docking.
var peopleID = $('.people[title="' + $('#person-wrapper').val() + '"]').attr('sharepointid'); 

$().SPServices({ 
    operation: "UpdateListItems", 
    ID: userInformation.listitemid, 
    async: true, 
    batchCmd: "Update", 
    listName: "People", 
    valuepairs: [   
        ["People", peopleID],
    ]

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>