Can a variable be coded in CAML powershell for Sharepoint online?

Copper Contributor

$Items = Get-PNPListItem -List 'ListBB' -Query <View><Query><Where><Eq><FieldRef Name='fueltype'/><Value Type='Text'>$dresda</Value></Eq></Where></Query></View>


Is there a way that $dresda field assigned from another list item can be passed to the query? The objective is to read all the items in ListAA retrieve and update the matching one in ListBB

2 Replies
Sure...this is for OnPremises, but you can grab the portion of code you need:

Hi Juan. Sorry for the delay in replying.


I have discovered that CAML queries don't work on >5K big SharePoint lists so looking at other options..


Will try when I get a chance.