[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Quesitons around searching a view

Posted on 2007-11-14
6
Medium Priority
?
233 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

649 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