SharePoint : How to check for null and not Null Column value with a CAML Query? in Powershell Script 7

67 views Asked by At

I have this CAML:

$CAMLQueryUpdate = "@<View Scope='RecursiveAll'><Query>
      <Where>
      <IsNull>
      <FieldRef Name='" + $LoanField + "'/>         
      </IsNull>
      <And>
      <IsNotNull>
      <FieldRef Name='" + $AppNumField + "'/>         
      </IsNotNull>
      </And>
      </Where></Query></View>"  

        $ItemsToUpdate = Get-PnPListItem -List $List.Title -Query $CAMLQueryUpdate

This checks if the value of LoanField == IsNullOrEmpty And AppNumField has value in sharepoint. these two are cloumns in sharepoint.

Above query giving me wrong result. Any Help how to fix it?

0

There are 0 answers