Web View

Hi,
I have a view which lists documents categorized based on countries. Now I want a way so that I can use a Dialog box in the $$viewtemplate form . I can select the country from this dialog box and to list all documents of that category . Something similar to
the link in http://www.lotus411.com 
program tips.

Thanks for the help in advance
RAjen
RajenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

melbor1Commented:
1.  Set up a view for each country.
2.  On the $$ViewTemplateDefault have a keyword field and a field called ViewName.  
3.  Based on the selection in the drop down box, set the ViewName field to the name of the view that should be displayed. (ViewName is a computed field )
4.  Use an embedded view for the view to be displayed.  When you created the embedded view, select 'Choose a view based on a selection formula'
5.  Enter ViewName in the view selection area.

this should work....make sure your keyword selection field has the property 'Refresh fields on keyword change' so it changes every time.

Good luck!

Melissa
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RajenAuthor Commented:
Is it possible to do with a single view
0
melbor1Commented:
To do this you would have to use a URL to open the view.

Example:

http://www.website.com/database.nsf/viewname?openview&StartKey=F


I'm not sure how you would implement this with the selection box.

Melissa
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

RajenAuthor Commented:
Hi Mellisa,
Thanks for your hint. Now I have used a form where I have embedded the view. I have a keyword field in the form which looks up for the country name from another view. In the HTMl attributes of this form I have written java script to submit the form on keyword change.
I also have a$$Return field and I open the this form passing the Startkey with the county selected. Now everything works fine, except the view also shows the other documents.
Ex If I select Belgium. It shows belgium documents followed by documents of Cananda .

Is there any way I can restrict it to show only the documents of  the country I used in the Startkey parameter.

Rajen
0
melbor1Commented:
This is the very reason I suggested separate views.  However, the only thing I can come up with is, if you know how many documents there are for that country you can make the URL look like this:

http://server/database.nsf/view?openview&startkey=Belgium&Count=15

where count is the number of documents.

If you could somehow set a field to the current number of documents for that country, then concantenate the number into the URL, it would work.

Good Luck!

Melissa
0
RajenAuthor Commented:
Hi Mellisa,
Thanks for your suggestion. I have implemented the view. I added a field in the form which based on the selection done checks the number of documents in a view using dblookup. The value of this field I pass it to the $$returnfield
"["+Dbname+"/Category?OpenForm&StartKey="+Countryfield+"&Count="+@text(Counterfield)+"]"
it works now except for the reason it once refreshes to change the value in the newly added field and user has to press the button to submit.Any suggestion for this is appreciated
Thanks
Raj
0
RajenAuthor Commented:
Hi Melisa,
I have done it. It works fine
Thanks
Rajen
0
RajenAuthor Commented:
Hi Melisa,
I have done it. It works fine
Thanks
Rajen
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.