Solved

Quesitons around searching a view

Posted on 2007-11-14
6
226 Views
Last Modified: 2013-12-18
The database I'm support contains request from 2 different departments. We have multple views that show docs from both departments. I would like to add buttons to the top of the screen that filter the list by either department. Unfortunately, the form I am searching on does not include the department field, so I was thinking about using an ftsearch. But that's a collection method and I'm not sure how to refresh my views with the results of the search. Is that possible?

End result would work like this....I open a view that shows all dept's. I press a button that says dept A, and the view updates to show just dept A.

Thanks!
0
Comment
Question by:BillTr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 200 total points
ID: 20285986
Umm, you can't directly filter a view by full text search.  LotusScript gives you no access to the search interface. Any ftsearch you do only applies to the objects in the script. Bill (I think it was Hanson) has a bit of code posted recetly that uses SENDKEYS to conduct the search in the searchbar, as if the user had entered the search terms manually.

Also, you mean the form doesn't contain the field, or the document doesn't contain it? If the DOCUMENT doesn't conta it, you have no way to search. If the form doesn't contain it, but the document does, you can do a search, just not using the "Fill outr example form" dialog. Instead, you do the "Field..." search dialog ("by Field").

You can also use @SetViewFilter, if  the view categorizes on department. If not, you can switch to a view that does ctagorize on department and set the filter. It works a lot faster than ftsearch.
0
 
LVL 14

Assisted Solution

by:cezarF
cezarF earned 100 total points
ID: 20286015
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 20307055
How do you know that a document is from dept A? If you were to do a query like in SQL, what would it be?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BillTr
ID: 20316117
Sorry for being so slow getting back. The form is used for requests to various systems. Different dept's
have different systems. So my query would be to select the systems for dept A.

I can  make this a field on the form too, update the existing forms, etc. But, if I do that,what I want to avoid is having more views...

I was wondering if I could select docs via the ftsearch, then somehow leverage the "ViewShowOnlySelected" function to filter the view?

It's possible to call a function from a script now, right?



0
 
LVL 46

Assisted Solution

by:Sjef Bosman
Sjef Bosman earned 200 total points
ID: 20319017
You can do two consecutive searches if you want, the first one in the entire database, and the second one based on the results of the first request. I think you can also do an FTSearch on the selected documents in a view, using the UnprocessedDocuments property. But what you cannot do is JOIN-like searches, which means that all data you're searching for must be in the documents themselves.

By the way, whether a field is on a form or not is not relevant for searching the database. The field must be in the document, and since fields that do not appear on a form can still be in the document, you'd have to inspect the documents when you're searching to find out how to proceed exactly. But usually, form and document go hand in hand.

To show the documents found with an FTSearch, you can use a NotesNewsletter object. There are some examples in the Designer Help database.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 20323414
Yes, you can call a function from a script, but the one you want to use -- FTSearch -- does not do what you think it does. The documentation is a little confusing. You might think it filters down the view that the user sees.  It doesn't. It only filters down the way that particular script will access the view (an "in memory" filter). The user's view appearance never changes.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question