Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

I need to filter on a lookup field when using CAMl Query.

$
0
0

I have the below function. I need to modify the caml to filter on a lookup field. I have not had much success. Help is appreciated.

function getAdditionalApprovals()
{
     var ListName = 'Additional Approvals';
            var ctx = SP.ClientContext.get_current();
            var list = ctx.get_web().get_lists().getByTitle(ListName);                              
            var caml = SP.CamlQuery.createAllItemsQuery();          
            caml.set_viewXml("View><Query></Query></View>");
            this.allitems = list.getItems(caml);
            ctx.load(this.allitems);
            
            ctx.executeQueryAsync(Function.createDelegate(this, this.onAdditionalSSucceededCallback ), Function.createDelegate(this, this.onAdditionalsFailedCallback));

}


faye fouladi


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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