I am getting no results with this search statement. “SELECT (Form = “Imported Data” &StudyStatus != “OnHold” & StudyStatus != “On Hold” & @IsMember(Asset_No;@DbColumn(”“:“Cache” ; “”; “AssetList”; 1)))”. When I did not specify “Cache” I had the same result in the design view, but when I hit the button to see in in the client view, it gave a selection which ignored the @IsMember condition. Once I found a list of @Commands that can’t be used in a selection, but I can’t find it now. This is a calendar view. Any suggestions?
Subject: Trouble with view selection
Subject: RE: Trouble with view selection
Thanks for the link Cesar. Can you suggest a way to access a user editable list of values in this view selection?
Subject: RE: Trouble with view selection
Have a look at single category views. For embedded views you can determine, that the first category should not be displayed but actually be used to filter the view.
I’m not exactly sure what you want to display, so I can’t suggest what would have to go into the show single category event. This is e.g. a place where @UserName is often of good use.
Subject: RE: Trouble with view selection
This is a calendar view of project milestones planned and met. Of my hundreds of projects I want the user to be able to identify 6 to 10. He wants see 8 milestones for each. I can’t seem to categorize within a calendar view.
Subject: RE: Trouble with view selection
I suspect the reason is that Calendar views do not allow for categorization - the second tab of the view properties dialog has the “Show response documents in a hierarchy” greyed out and unchecked.
Subject: RE: Trouble with view selection
Then your choices are probably down to search and folders.
Subject: RE: Trouble with view selection
I think that the issue is that Sarah has a requirement to produce a Calendar view but one that shows cateogrization. However, this is not possible in Calendar views - even if the view does not use a response hierarchy, Columns in the calendar view can be configured as sorted but never categorized (option for categorization is greyed out).
So, Sarah, if you need categorization, you will need to create a “Standard Outline” view instead of a “Calendar” view.
Subject: RE: Trouble with view selection
Right, and that’s why “All calendar entries” displays standard views. But I could still imagine user’s picking projects by some unique key and having a scheduled agent putting those documents in a calendar style folder.
Though I wouldn’t want to be the one to do the programming, I stay away from calendar stuff as long as I can.
Subject: RE: Trouble with view selection
Categorization was Harkpabst Melia’s idea. I have created lots of selections in Calendar Views. According to the charts I linked to (Thanks again Caesar) @IsMember works in selection statements, but @DBCOlumn does not. With that in mind I now have a statement that says “SELECT (Form = “Imported Data” &StudyStatus != “OnHold” & StudyStatus != “On Hold” & @IsMember(Asset_No; “101468”:“572016”:“GSK189075”:“GSK679769”) ) where “Asset_No” is the name of the field in the form which holds the value that might match the values listed after asset_no. It does not work. Views in the tables are not distinquished “Calendar” and “Standard Outline”, so I guess I should try to selection in a standard view. I might try to explode the if so it says if asset no =”" or Asset_no =“” but I hate to have to code these values into the selection because I expect them to change. If anyone has a brainstorm let me know. Thanks Sarah
Subject: RE: Trouble with view selection
Yes, you should try the selection in a standard view. There’s no problem with the @Functions you are using. If it doesn’t display any documents, then the problem is either with the logic of your selection statement (i.e. there are no documents that match the selection criteria) or the documents are being selected but are not appearing on the dates you expect. Calendar views are different in that way – if you’re not on the right page you see no documents. Also, calendars have to have values of certain types in the first couple of columns. If you have a text field which should’ve been a date, I suspect you won’t see that document at all.
Subject: RE: Trouble with view selection
Thanks Andre. I finally have the view working but I still have the problem I started with. That is I know that the values in the list will change, and I want the user to be able to change them without editing the view. Any ideas?
Subject: RE: Trouble with view selection
Yes - that is a problem with views - you can’t use @DbLookup in a selection or column formula so the only option you have is to use folders, as Harkpabst suggested earlier. At the risk of assuming that you don’t know, folders are like views but without selection formulas and you simply move documents into or out of them as you need.
Check out
PutInFolder, Folder methods
in LotusScript or
@Command( [Folder] ; folderName ; moveOrCopy )
in formula for more info on how to use folders.
Subject: RE: Trouble with view selection
Thank you Cesar. You are right I haven’t used folders. Never understood the difference between views and folders. Your explanation is gold. I will be copying not moving docs into the folder. I can’t find anything about emptying a folder. So if I run the agent every time I change the list of values that selects the records for the folder, do I need to create a new folder?
Subject: RE: Trouble with view selection
You can use
NotesDocument.RemoveFromFolder , NotesDocumentCollection.RemoveAllFromFolder
in LotusScript and in @Formula, you have
@Command( [RemoveFromFolder] )
to remove document from a folder.
Subject: RE: Trouble with view selection
And one more important note, Sarah, to further clarify the differences between views and folders:
Moving documents into a folder has no effect on what’s displayed in views. A view’s content is strictly determined by its selection formula. As long as a documents complies to the conditions layed out in the formula, it will always appear in that view, no matter if or if not it is displayed in any folder.
To distinguish between “moving” and “copying” makes sense only, when talking about folder to folder transactions. A folder only contains, what you put inside, so in this context, it makes sense to either move a document to another folder (removing it from the current one) or to copy it to another folder (so it will be available in two folders).
Finally, here is the one thing I really don’t like about folders too much: From what’s been said until now, you could come to the conclusion, that folders merely hold pointers or references to documents. Not quite. If you delete (not remove!) a document form a folder, it is actually deleted from the database. It’s gone forever from all other folders and - of course - from all views.
Subject: RE: Trouble with view selection
So you would prefer that when you are in a folder, such as your mail inbox, there should be no way to delete the document from the database?
Subject: RE: Trouble with view selection
No, I would prefer that delete would just delete the current “reference” to the document, as long as referenceCount > 1, and actually delete the document itself, if referenceCount = 1.
And no, I’m not absolutely convinced, that this would make it easier for all users. But it would make it easier for me. ![]()
However, I still think that most users have more trouble to get used to the view concept than to folders. We had an interesting discussion on the topic some time ago on Alan’s blog.
http://www.alanlepofsky.net/alepofsky/alanblog.nsf/dx/remove-or-delete?opendocument&comments
That said, I for my part are so much used to having views and folders alongside in Notes mail (or was, I should say, currently I have to use Outlook), that I wouldn’t want to miss the power of both.
Subject: RE: Trouble with view selection
Alternatively, you could have an agent that runs when you change the keyword list, and uses the NotesView class to change the selection criteria of the view. Or, you could run an agent periodically to decide whether documents belong in the view and flag them with a special field value that the selection formula would test. I prefer the former way.
Subject: Thank you, all, Cesar, Harkpabst, Andre.
I learned a lot.