Hi.
I’m facing a problem with a view I need to make here and I’m not used to Domino development, I’m more an Administrator then a Developer.
So this problem may be quiet easy for you guys.
I have a form with 2 fields, the name of the customer and the date of the purchase.
I need to build a view that shows all the customers that have bought from us in 2007 and that have not bought from us in 2008.
I’ve tried some things here but without success.
Can you help me?
Thank you so much!
Subject: View selection formula should accomplish this
If the purchase date field is PDATESELECT @Year(PDATE) = 2007
Subject: That will take an agent to filter out - or a RDBMS
With SQL you could do this with a sub query but not in a notes viw. THe formulas are based on the individual document’s data not across them.
Agent would get all customers with a purchase in 2007 and see if they have a 2008 purchase, if yes then put the document in a folder.
Then they view the folder.
Subject: Or an agent to maintain hidden fields
You could also modify the form to run code on save that modifies the rest of the customer’s documents with a most recent purchase year. Then a view that selected documents with purchase date of 2007 and most recent purchase year also 2007. (You’d need to seed the hidden field so it’s correct in the first place.)
Subject: Oops! You wanted to exclude Customers that have not purchased in 2008.
Let me think on this a moment
Subject: How about
SELECT @Year(PDATE) != 2007