Xpages search between 2 dates

前端 未结 1 1302
南笙
南笙 2020-12-12 05:03

I have a view with some data, and a column with the creation date of each document. I want to make a search feature with 3 input fields: Name, StartDate, EndDate. The result

1条回答
  •  执念已碎
    2020-12-12 05:39

    Use the search property of DominoView data source. It does a full text search on all documents in view. Create a search string like

    [Name]="Meier" AND [_creationDate]>=12-01-2013 AND [_creationDate]<=30-08-2014
    

    Your data source code would look like this:

        
            
                =' + formatter.format(viewScope.StartDate);
                }
                if (viewScope.EndDate) {
                    search += ' AND [_creationDate]<=' + formatter.format(viewScope.EndDate);
                }
                return search.substring(5);}]]>
            
        
    

    This code assumes that there are editable search fields which value is bound to viewScope.Name, viewScope.StartDate and viewScope.EndDate e.g.

    
    
    
    
        
            
            
        
        
    
    

    0 讨论(0)
提交回复
热议问题