Solved

Quesitons around searching a view

Posted on 2007-11-14
6
222 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
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now