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

View Filter

$
0
0

I need help on a view filter. I tried it via view UI setting but does not work. Then I am working in designer with the following code. I got an error when I open it in browser “Cannot complete this action. Please try again.”. I appreciate if someone can help me out on the query. Many thanks.

If in code, the condition should be

(OutstandinginvoiceTotal > 0)&&

  (

      (Today() - InvoiceDate > 60 && Today() – InvoiceDate < 30) ||   

      (Today() - InvoiceDate_2 > 60 && Today() – InvoiceDate_2 < 30)

  )    

Here is the view filter

<Query><Where>

    <And>

        <Gt><FieldRef Name="OutstandingInvoiceTotal"/><Value Type="Currency">0</Value></Gt>

        <And>

             <Geq><FieldRef Name="InvoiceDate"/><Value Type="DateTime"><Today OffsetDays="-60"/></Value></Geq>

             <And>

                <Lt><FieldRef Name="InvoiceDate"/><Value Type="DateTime"><Today OffsetDays="-30"/></Value></Lt>

             </And>

        </And> 

        <Or>

             <And>

                <Geq><FieldRef Name="InvoiceDate_2"/><Value Type="DateTime"><Today OffsetDays="-60"/></Value></Geq>

                <And>

                   <Lt><FieldRef Name="InvoiceDate_2"/><Value Type="DateTime"><Today OffsetDays="-30"/></Value></Lt>

                </And>

             </And>

        </Or>      

    </And>

</Where></Query>



Viewing all articles
Browse latest Browse all 7589

Trending Articles



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