Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a working jQuery SPServices code for a column Description in a list. The problem is, that when I try to get the data from another column, Project Item, with the same code, nothing happens. Also, when I try to put the code for the both columns, the code does not work for any. Both columns are of Single line of text type. The code is following:

<script language="javascript" type="text/javascript" src="/SiteAssets/Scripts/jquery-1.8.3.min.js"></script>
<script language="javascript" type="text/javascript" src="/SiteAssets/Scripts/jquery.SPServices-0.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        document.getElementById('ctl00_m_g_b3f08547_27a4_484c_938a_f92864c47b7a_SPTextSlicerValueTextControl').title = 'Test';

        $().SPServices.SPAutocomplete({ 
            sourceList: "Projects",
            sourceColumn: "Project Item",
            columnName: "Test",
            ignoreCase: true,
            numChars: 2,
            slideDownSpeed: 50,
            debug: true
        });
    });
</script>
share|improve this question

2 Answers 2

up vote 0 down vote accepted

sourceColumn should be the internal name of the column, not the displayname.

You can get the internal name for a column by browsing to: List Settings > Edit Column and look at the QueryString.

share|improve this answer
    
Spent hours on this! Thank you very, very much! Just in case anybody wonders, the internal column name is in the QueryString which can be seen in the page URL, Field=YourInternalColumnName. Thanks again! –  dzookatz Apr 17 '13 at 12:18

You should change the display name to internal name.

You can find the internal name:

  1. Go to List Settings
  2. Scroll down on page to Columns section
  3. In the list of Columns, click on the column names
  4. View the address bar of the browser and look for the querystring part:
  5. Then look for the '&Field='
share|improve this answer
    
Thanks for your help, and this is the right answer too, Robert was just quicker. –  dzookatz Apr 17 '13 at 12:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.