View selection formula not working

hi all

I need to show the documents of the visa expiry in next 15 days. I have a main document and a response document the date of visa expiry in response document and there can be more response docs for a main doc. here is my selection formula…

SELECT Form= “frmEntry” | Form= “frmNewEntry” & (dtVisaValidity >= @Today & dtVisaValidity <= (@Adjust( @Today ; 0 ; 0 ; 15 ; 0 ; 0 ; 0 )))

however i m not able to view a single document.

any help would be appreciated :wink:

Sanjay

Subject: view selection formula not working

Response documents won’t show in a view without their parent until you deselect the view property “Show response documents in heirachy”.

Strongly advise against using @now/@today in view selection or column formula as it adversely impacts performance by thrashing the indexer on your server - basically it has to CONSTANTLY rebuild the view index - you will notice the blue refresh arrow top left of view doesn’t go away.

Use a field flag and select based on that OR another neat way of doing it is to write an agent that actually CHANGES the view selection formula itself and then using a date constant in the formula i.e.

[20/03/2009]

is a date constant. You code runs in a daily agent at night and does a sting replace.

Subject: view selection formula not working

Hi,

Try:

SELECT (Form= “frmEntry” | Form= “frmNewEntry”) & (dtVisaValidity >= @Today & dtVisaValidity <= (@Adjust( @Today ; 0 ; 0 ; 15 ; 0 ; 0 ; 0 )))

But I think better solution is to use which which will update each document every day (to mark which document to display in view) than using @Today formulas in selection formula.

Konrad

Subject: RE: view selection formula not working

Hi KonradThanks for your quick reply. I got the code…pls find below. No need to write response form name.

SELECT Form= “frmEntry” | (dtVisaValidity >= @Today & dtVisaValidity <= (@Adjust( @Today ; 0 ; 0 ; 15 ; 0 ; 0 ; 0 )))

Thanks

Sanjay