View Filter

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>

I play around and the following works now. However, I need to add InvoiceDate_3 to InvoiceDate_5. I just copy the same block for InvoiceDate_2 to InvoiceDate_3 but it errors out?
<Query><Where>
   <And>
      <Gt><FieldRef Name="OutstandingInvoiceTotal"/><Value Type="Currency">0</Value></Gt>
      <Or>
       <And>
          <Geq><FieldRef Name="InvoiceDate"/><Value Type="DateTime"><Today OffsetDays="-60"/></Value></Geq>
          <Lt><FieldRef Name="InvoiceDate"/><Value Type="DateTime"><Today OffsetDays="-30"/></Value></Lt>
       </And>  
       <And>
          <Geq><FieldRef Name="InvoiceDate_2"/><Value Type="DateTime"><Today OffsetDays="-60"/></Value></Geq>
          <Lt><FieldRef Name="InvoiceDate_2"/><Value Type="DateTime"><Today OffsetDays="-30"/></Value></Lt>
       </And>     
      </Or>
   </And>
</Where></Query>

Similar Messages

  • List View Filter - I want to create List View based on a specific user

    I want to create a List View Filter based on specified user ID. I dont want to specify the [Me] for filtering the view based in current logged in User.
    I want the view to be based on specific user ID for Ex: "AD\JohnDoe"
    Thanks
    Nate

    The People/Group Picker field has several options for how the name is displayed. For example you can set it to be the friendly name or the account name. When you create your View Filter, make sure that you are using the same format as the field's display
    type.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Passing Session variable of DATE data type to opaque view filter

    Hi Everyone,
    Can you guys please help me in passing session variable of DATE data type in RPD's physical layer 'opaque view' filter for Oracle database
    I tried following syntax, syntax wise I didn't got getting any error, but at the same time this opaque view is not fetching any records as well. my session variable is "END_DATE" and its value is 1998/12/31:00:00:00(as shown in RPD session windows, datatype is DATETIME)
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID =TO_DATE( 'VALUEOF(NQ_SESSION.END_DATE)','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TRUNC(TIME_ID) = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    In past, I was able to pass a session variable into a opaque view filter using DATEOF function, but that was in DB2.
    I appreciate your time and help

    Finally, I got right format. here it is
    to_date(substr('valueof(NQ_SESSION.END_DATE)',1,10), 'yyyy-mm-dd')
    and here is the source from where I got this information
    Using OBIEE Session Variables in Select Tables in the Physical Layer

  • SharePoint 2010 list view - How to filter on a multiline text box field - the view filter does not allow me to select it.

    Hi there,
    Does someone know in SharePoint 2010 list view - How to filter on a multiline text box field - the view filter does not allow me to select it.
    Thanks,

    Hi,
    Per my knowledge,
    it is by design that the data type multiple lines of text can only use “contains” and “begins with” operators.
    You can also filter the list view using SharePoint Designer,
    Open your list AllItem.aspx page in SPD ->click “Filter” > in “Field Name” select your multipe line of text field, in “Comparison” will displayed four choices.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • View Filter Presets - Yes, they can be iterated, and set, but...

    Anybody know how to create a view filter?
    For example, my first use case would be to filter on PV2003 - anybody know how to do that?
    (Back in the good ol' days I would just run a plugin to set custom metadata, then filter on the custom metadata (like Jeffrey Friedl's Focal Length Sort did), but isn't there a better way in SDK3.0? - Even if undocumented, for example, create a view-filter preset file that accesses unexposed fields... - Lightroom would probably have to be restarted to use it though, hmmm..
    Any help?
    Thanks,
    Rob

    John,
    I do have a few more cores but I think the big difference is LR3 vs LR2.  I am still in 2.5 awaiting some performance fixes before switching to v3.  I continue to test LR3 on both my desktop (8 cores) and laptop (2 cores).  Here is what I am finding:
    In version 2.5, it takes approximately 4 times longer to fill the shadow field if all are empty than simply checking.  So my rate of 2-3,000 per second is primarily checking - but that is what it will be doing most of the time once the initial fill is complete.  I see very little difference between my laptop and the desktop for this test.
    Running v 3.0 it much, much longer to fill the fields than in v 2.5 - maybe a slow as 25/second.  Again, I see very little difference between the laptop and the desktop.  The worst part is that in 3.0 the incremental fill takes just as long as the initial fill - this might be related to the issue whereby issuing a Ctrl-S is not longer incremental but updates all images (hopefully an error on Adobe's part that will be corrected soon).
    Conclusion, I think what you are seeing is primarily a difference between v2 and v3 of Lightroom; however, you seem to be getting much of that performance back by using the batch commands which, as a side note, I have not yet implemented since those commands just came out with v3.  I just loop through the catalog and read metadata one image at a time.  The relevant code (not pretty so don't laugh) is basically:
    --###################### task code  ###########################################
    LrTasks.startAsyncTask( function()
    -- get a reference to all the photos in the entire catalog
    local cat_photos = nil
    catalog:withReadAccessDo( function()
         cat_photos = catalog.allPhotos
    end )
    -- determine number of photos to be processed
    local ncat_photos = #cat_photos
    -- confirm the action since it can be massive on large number of photos
    local message = "Are you sure you want to create the duplicate field for the folder name and set the Metadata errors field of the " .. ncat_photos .. " selected images?"
    local returnbutton = di.confirm( message,nil,"Yes")
    if returnbutton == "cancel" then
         progressScope:done()
         return
    end
    -- get access to the current catalog
    catalog:withWriteAccessDo("Construct Captions", function()
    --di.message("Jeff Dialog",tostring(#cat_photos),"info")
    local cap_string = "Checking/Updating " .. tostring(ncat_photos) .. " images "
    progressScope:setCaption(cap_string)
    -- loop through each of the photos selected
    local indexnum = 0
    for i, photo in ipairs(cat_photos) do
    indexnum = indexnum + 1
    local fold = trim(photo:getFormattedMetadata('folderName'))
    local kws       = photo:getFormattedMetadata('keywordTags')  -- retrieves keywordes ENTERED
    local sfold     = photo:getPropertyForPlugin(_PLUGIN, 'shadowFolder' )
    -- remove blanks that don't work for filter bar purposes
    local shadfold  = string.gsub(fold, " ", "")
    shadfold  = string.gsub(shadfold, "_", "")
    local firstchar = string.find(shadfold,"%a") -- finds first alpha character
    if firstchar == nil then firstchar = #shadfold+1 end
    shadfold = string.sub(shadfold,1,firstchar-1) .. "|" .. string.sub(shadfold,firstchar,#shadfold)
    -- if in year/mo format, then insert dash between year and month
    if firstchar == 7 then
         shadfold = string.sub(shadfold,1,4) .. "-" .. string.sub(shadfold,5,#shadfold)
    end
    -- COPY folder without blanks or _ to duplicate field
    if shadfold ~= sfold then
         photo:setPropertyForPlugin(_PLUGIN, 'shadowFolder', shadfold )
    end
    end      -- of looping through selected photos
    end )    -- of catalog:withWriteAccessDo
    end)     -- of task
    --###################### end of task code  ###########################################
    Here's to hoping 3.1 brings our performance back!
    Jeff

  • View Filter Value DP_VIEW_FILTER and Pass it to multi data providers

    Hi
    We are using the following command to view filter values and expand in the dataprovider_1
    SAPBWOpenWindow(SAP_BW_URL_Get()"&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=DP_VIEW_FILTER&DATA_PROVIDER=DATAPROVIDER_1&IOBJNM="iobjnm, "FILTER",800,600);
    (got the code from a PDF that showed how to use drop down for to select multiple values)
    Is there a way to pass this value to multiple data providers like shown below?
    SAPBWOpenWindow(SAP_BW_URL_Get()"&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=DP_VIEW_FILTER&DATA_PROVIDER=*&MULTI=X&IOBJNM="iobjnm, "FILTER",800,600);
    There is a bug in this code and i am not sure how to use the Dataprovider = * and Multi = X!
    In dropdown box, i gave affected data providers as all three..
    no luck..
    Please help. thanks

    Put * and X in single quotes
    Try using the folllowing
    SAPBWOpenWindow(SAP_BW_URL_Get()"&CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=DP_VIEW_FILTER&DATA_PROVIDER='*'&MULTI='X'&IOBJNM="iobjnm, "FILTER",800,600);
    Edited by: Rakesh Pattani on Dec 20, 2007 10:52 AM

  • List View (filter) based on multiple fields

    Hello. I've created an infopath form where a Project Manager is able to name 12 project members in various departments using a people picker field for each project member field. Is there a way to filter the list so that it shows only
    the projects the individual project members are involved in based on whether he/she shows up in any of the 12 member fields? The members are not necessarily the ones creating the list item. I am limited to 10 filters in the view settings
    in the sharepoint list so that won't work. Any assistance would be greatly appreciated.
    Have a great weekend.
    Cory

    Hi Cory,
    I’m sorry, from that way you can filter by current user, but also can’t add more than 10 parameters. The only way to add
    more than 10 filters is to use xpath by check add xslt filtering, then click edit.
    I have a try on my server, please check the following steps.
    Create a parameter by click parameters.
    On the data view parameters dialog, click new parameter, name Param1. From parameter source, select server variable, set LOGON_USER as server available name. Then click ok.
    Go to filter, on filter criteria dialog, check add xslt filtering, then click edit.
    Add the following xslt code.
    [@people.title=$Param1 or @people1.title=$Param1 or @people2.title=$Param1 or @people3.title=$Param1 or @people4.title=$Param1
    or @people5.title=$Param1 or @people6.title=$Param1 or @people7.title=$Param1 or @people8.title=$Param1 or @people9.title=$Param1 or @people10.title=$Param1 or @people11.title=$Param1]
    Best Regards.
    Kelly Chen
    TechNet Community Support

  • List view - filter with parameters

    Hi,
    I need to define a list view to filter data with parameters.
    I saw how to do it with the SPD in another post
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/92271aa4-6582-4ea5-a10f-deaf02d2b62c/filtering-the-list-view-by-passing-date-parameters-using-sharepoint-desginer-2010?forum=sharepointcustomizationprevious
    But  need to do it in visual Studio (via definitins or Object Model).
    How can I do that in Visual Studio?
    Help is really appreciated.
    Many thanks,
    DD

    Hi,
    According to your description, you might want to create a list definition with the filter value from query string from URL. Then when you create a list instance with this list
    definition, you will be able to filter the list view page by appending parameters to the URL in the address bar.
    You can achieve this through modifying the Schema.xml file in the list definition project in Visual Studio like this:
    How to create custom list definition
    http://msdn.microsoft.com/en-us/library/office/gg276355(v=office.14).aspx
    http://www.codeproject.com/Articles/412429/SharePoint-Create-List-Definition-and-Instanc
    CAML Query Schema
    http://msdn.microsoft.com/en-us/library/office/ms467521(v=office.15).aspx
    Then we can filter the list with such an URL:
    http://sp/Lists/List1/AllItems.aspx?Param1=2014-08-24&Param2=2014-08-28
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Error using WEEKDAY function in view filter

    I want to be able to display all events in a calendar for the following week (Saturday to Saturday). I have created a column called week_end that is a calculated column and gives the date of the Saturday after the event:
    =[Start Time]+(7-WEEKDAY([Start Time]))
    I then want to use a filter based on Today as follows:
    Show only items when week_end is greater than
    [Today]+(7-WEEKDAY([Today]))
    and less than  
    [Today]+(7-WEEKDAY([Today]))+7
    However I get the error: Filter value is not in a supported date format
    Any ideas what the problem is? I seem to be able to do things like [Today]+3, but I want the view to be from Saturday to Saturday regardless of what day I look at it.
    Thanks
    Kate

    Hi,
    According to your post, my understanding is that you wanted to display all events in a calendar for the following week (Saturday to Saturday).
    You can't use complex formula in Filters - you have to keep it simple like [Today]-30 for last 30 days.
    The solution is to turn the problem on its head and add calculated columns to work out the start of the week and the end of the week then filter when the current date is between those dates (i.e. Start <= [Today] AND End >= [Today])
    Please follow the steps as below to achieve what you want:
    Create a “WeekStart” calculated column, select “Date and Time” as a data type returned by the formula:
    =[Start Time]-WEEKDAY([Start Time])
    Create a “WeekEnd” calculated column, select “Date and Time” as a data type returned by the formula:
    =WeekStart+7
    Create a “PerWeekStart” calculated column, select “Date and Time” as a data type returned by the formula:
    =WeekStart-7
    Modify view, show items only when the following is true:
           PreWeekStart is less than or equal to [Today]
           And
           WeekStart is greater than [Today]
         5. Open the view, it will
    display all events in a calendar for the following week.
    Generally, the week goes Sunday to Saturday. If you want to display all events in a calendar for the following week (Sunday to Saturday), you need to modify the calculated column:
    WeekStart: =[Start Time]-WEEKDAY([Start Time])+1
    WeekEnd:   =WeekStart+6
    Here are two similar threads for you to take a look at:
    http://blog.pentalogic.net/2012/09/complete-guide-to-filtering-sharepoint-lists-by-the-current-week/
    http://rehmangul.wordpress.com/2010/10/06/filter-views-based-on-a-week/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • SharePoint 2010 Datasheet View - Filter not displaying correctly on list

    Hi,
    I have a list where I want to filter in datasheet view.  The filter will work correctly when I first open Internet Explorer:
    However, if I open the list again and go into datasheet view I get the following filter which does not display correctly:
    Has anyone else come across this?
    Mark

    Hi Mark,
    please have a try on this kb too:
    http://support.microsoft.com/kb/2760758/en-us
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Essbase - SmartView Smart Slice View Filter

    Hallo There,
    My customer asks me to create filter in SmartView. When we create Smart Slice for Essbase, we will have the list
    New SmartSlice
    New SmartSlice 1
    New SmartSlice 2
    etc..
    My customer wants if she can view New SmartSlice 1, but her colleagues won't be able to see New SmartSlice 1 as well, only can see New SmartSlice 2.
    As far as I know, this is not possible as Essbase doesn't store any security for Smart Slice level.
    Could someone please advice if that's really not possible or there is any workaround regarding the request?
    Thank you.

    I don't think you can assign security to Smart Slice, by the only security that I see is smartview.smartslice.management.grantAnyUser which will grant any user to create a Smart Slice (Didn't see that working for a Read user though)
    Regards
    Celvin

  • Programmatically use a view filter function

    Are there any way to activate the built-in filter functionality from the SDK? (The one on top of a view: Edit Criteria->Add Criteria)
    I need to make a task, which filters the current view, based on what the user selects in my task.
    More specifically: A view has a number of columns, one of them being Classification Category. So by using a list of those, can I take the users input, and use it to filter a view by Classification Category?
    Alternatively, as I suspect the above isn't possible, how do I display a list of incidents in a custom form? Something like the search window, I would like to be able to display a list of incidents, which corresponds to some criteria, and enable the users to
    double-click to open them.

    Yes, essentially. I'd like to define the content of my emails in facelets via XHTML files, ideally with as few restrictions on what parts of JSF/facelets can be used as possible.
    To be a little more explicit, suppose I've defined my email contents in /WEB-INF/email.xhtml and it has parameters x, y and z. I'd like to have a class, say MagicViewRenderer, which could do the following:
    MagicViewRenderer mvr = new MagicViewRenderer(facesContext);
    mvr.setParameter("x", objX);
    mvr.setParameter("y", objY);
    mvr.setParameter("z", objZ);
    String contents = mvr.render("/WEB-INF/email.xhtml");
    // Use contents as the body of an email message

  • Current View Filter

    Hi Experst;
    I have two questions about CV filtering.
    I am trying to select dimension member on buttons. Using with "MNU_ETOOLS_MEMBERSELECTOR_A" but i want to filter dimension member. I have a lot of member in dimension so i need to filtering.
    1-Is there any way to make a filter for "MNU_ETOOLS_MEMBERSELECTOR_A" function ?
    2-Can I use "EVCVW" function in macro ?
    Thank you for help.

    It is possible to get the username in the report. This is possible using the EVUSR() function.
    Also, it is possible to put a property based filter in the EVCVW() function, using the following syntax: EVCVW(APPNAME;DIMENSIONNAME;"PROPERTYNAME=PROPERTYVALUE").
    Using standard excel functionality, you could link this to the result of the EVUSR function and create a filter based on user name.
    Example:
    Dimension you want to filter on is Account in the Finance app. Property name is USER. The EVUSR function is in cell A1 and returns the value User1.
    Because the filter is a text string, first we need to create an excel link where you combine property name and username in the correct syntax for use in the EVCVW function. We are going to do this in cell A2. This function would come in Cell A2:
    ="USER="&A1
    This will result in the following text to appear in cel A2: USER=User1
    EVCVW syntax would be like this:
    =EVCVW("FINANCE";"ACCOUNT";A2).
    Now, if the users doubleclicks the EVCVW function, the memberselection box will open with the defined filter.
    However, if the user uses the CV box in the action pane, the filter will not be automatically applied, so you will need to explain to the users that they should use the cell you have created to apply current view changes.
    Something else you could do is use security settings in the member access profiles, but this could lead to difficulties as not al dimensions will be secured, and maybe you want to use other dimension members in other reports/input schedules.
    Regards,
    Tim Vierhout
    Edited by: Tim Vierhout on Oct 5, 2009 2:32 PM

  • Share Point 2013 List View Filter [Me] is not showing all the relevent record

    Hi
    I am using [Me] to filter in custom column "EmployeeLoginName" (is group/user type)
    But not able to get all the record of the loged in employee.
    only showing 1 record whereas there are 7 matching record.
    Any one ever faced this type of problem?
    Can any one tell the reason for this.?
    Thanks

    Hi Syn_Suresh,
    Did all 7 records have the exact current logged user's name in "EmployeeLoginName" column?
    Could you reproduce the issue on other new list, and other site?
    If it's not reproduced, the list may be corrupt.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Session in view filter

    Hallo,
    is there a possibility to use session in view Filters in Web Dynpro?

    I close this thread !!!

Maybe you are looking for

  • Photoshop 12.02 unexpected quits

    OSX 10.6.5. I'm getting unexpected quits upon opening Photoshop and beginning work (every time), need to solve this as I have a PS class to teach this week. I've defaulted preffs. Love some feedback. brgds Alex Log: Process:         Adobe Photoshop C

  • Post-processing f4v from FMLE without re-encoding?

    I've been looking for  a way to post process (simple cut & splice) f4v file from FMLE without re-encoding the file. There are some tools that can make this happen, but its output only works with Flash Player/VLC/etc., but cannot be played on the iPho

  • Read directory structure into tree structure

    Hi ya, I want to be able to write a command line program that either takes a root node(directory root) or just takes the directory root from where the program is run reads in the directory tree into a tree structure. Then I want to analyse the tree.

  • Is there a Cornerfix solution built into Lightroom?

    For those of you that use Cornerfix to reverse/eliminate corner vignetting and color shift in Leica M8/M9, and other mirrorless cameras using short register rangefinder lenses, is there a way to do this within Lightroom, using a Lightroom feature or

  • Get data from file in server to client and vice versa

    after greeting i really didn't know how to use socket and serversocket to get data from file in the server and display it to client. also read file from client and save it to server. really i didn't know how to do it. really i want the reply as soon