?
Solved

Quesitons around searching a view

Posted on 2007-11-14
6
Medium Priority
?
231 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 800 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 400 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 800 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 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