Hi all,
I have two forms in a database - “Main” form and a reply form “ReplyMain” which is of type response-to-response. One can create a response, reponse to response using the “ReplyMain” form. There is a computed text field called Overdue on both the forms. Other fields that are important for this selection formula are: MFrom, MSendTo and MCopyTo fields (these fields are on both the forms).
My users want a private hierarchical view that match the following criteria:
-
If form = “Main” and if overdue != “”, then show the main form and the children(if there are responses) if the @username is in one of the above MFrom, MSendTo or MCopyTo fields on either one of the forms.
-
If form = “ReplyMain” and overdue != “” and if the MFrom or MSendTo or MCopyTo contains @username(on either one of the forms), then show the response document as well as the parent document in the view.
I have been working on this for the last 2 days but I am not able to get exactly what I want. Any help/ideas would be greatly appreciated.
Thank you,
Archana
Subject: Complicated View selection formula
From what i understood you need a view that’s type “Shared,Private on first use” with the following selection formula
SELECT (Form=“Main” | Form=“ReplyMain”) & @IsMember(@Name([Abbreviate];@UserName);@Name([Abbreviate];MFrom : MSendTo : MCopyTo))
Question: Did you mean its possible for the response documents to have users that the parent document doesn’t have? And if so then do you want the parent document to show up with all its responses in this case?
Edit::
forgot the overdue condition:
SELECT (Form=“Main” | Form=“ReplyMain”) & @IsMember(@Name([Abbreviate];@UserName);@Name([Abbreviate];MFrom : MSendTo : MCopyTo)) & overdue != “”
Subject: RE: Complicated View selection formula
Ernesto,
Yes, that’s possible and yes the client would like to see the entire chain. I looked at the code you posted. Another possibility that I did not include in the original post was overdue(on ReplyMain) might be <> “”, but it is quite possible that the Overdue on the parent is equal to “”. In other words:
Response doc’s Overdue <>“”, and Parent doc’s Overdue = “”.
Thanks for your suggestion.
Archana Mulay
Subject: RE: Complicated View selection formula
If any response document with the user’s name will cause the entire thread to be shown for that user, then i would suggest the following: Having an additional field that you can set for all the documents belonging to the parent (using lotus script on the query save event on both forms maybe) called something like “ThreadReaders” which is a collective list of all the user fields in all the documents in the thread. In the same way you can have a flag field called “ThreadHasOverdueDocs” which works more or less the same way, except its being set so all documents are set to yes when there is any overdue document in the thread. It sounds a bit complicated but its the only way i can think off to get the behavior you’re looking for. This way you’re letting the forms do all the work instead of the view and it will keep your selection formulas simple. Its like having sort of summary fields that keep your whole thread synchronized.
Because of the way Notes views work, you can’t use lookup formulas on the fly in your view selection formula in order to know if you’re going to show a document or not. Also, if you’re view is hierarchical, you can’t show a response document if the parent document is not being displayed, and so on.
Subject: RE: Complicated View selection formula
Thanks for the tip. I will try that.
Subject: Complicated View selection formula
One question- can ReplyMain OverDue <>“” exist when the parent Main overdue = “”?
Subject: RE: Complicated View selection formula
Thom, Yes that condition can exist.