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

New Post: Use variables and pass to AutoComplete function

$
0
0

I have a need to insert variables into the call to SPAutoComplete dynamically, but have been unable to figure out how to pass variables. If I have something like this (it works great)

 

$().SPServices.SPAutocomplete({
 sourceList: "NDA", 
 sourceColumn: "Title", 
 columnName: "NDAField", 
 CAMLQuery: "2012",
...
}

 

I would like to do something like this, but it takes the value literally.

 

var A= "NDA";
var B = "2012";
var C = "[first part of CAMLQuery]"+ B +"[last part of CAMLQuery]";
$().SPServices.SPAutocomplete({
 sourceList: A, 
 sourceColumn: "Title", 
 columnName: "NDAField", 
 CAMLQuery: C,
...
}

 

I need suggestions on how to accomplish the desired task.


Viewing all articles
Browse latest Browse all 6517

Trending Articles



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