• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Embedded Views

Since an embeded view only displays a single view, is it possible to create a view that lists all other views in the current database.  What I am trying to do is create a form which will display all the views in the current data base, then use that form as the src for a frame in a three framed homepage.
0
Chris_m
Asked:
Chris_m
  • 4
  • 3
  • 2
  • +1
1 Solution
 
phooeyCommented:
You could:

Create a  field on the form that is populated, using script, with the list of the views.

Don't write out the views as just text, but write them out as links, using the target property to open them in a different frame.

i.e.
"<A HREF=" + server/database/view + "?openview TARGET=/_top/>" + ViewName + "</A>"
0
 
phooeyCommented:
This is the kind of script you will need to use.  Just look under NotesDatabase (views property) in the help db.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim textString as String
Set db = session.CurrentDatabase
Forall v In db.Views
  TextString = TextString + v.Name
End Forall


(Note, this won't actually work, but is a good starting place!)
0
 
pentapodCommented:
I don't suppose you're using R5?  It's easy using R5...

....Pentapod
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
HemanthaKumarCommented:
Hi Chris

What is the Notes Ver u r using ?

Do you wan't to show the list of views in the database on the Web or Notes ?

~Hemanth
0
 
Chris_mAuthor Commented:
I am using 4.6 ver 3b.  What I want to do is to use the document that has the list of views dynamically created as the source of a frame in a frameset homepage.  This so that the left frame of the homepage can display an expanded list of all the views in another database.  I can do this by physically creating links to the views, but that is not a good solution.  Far better to have them rerad and displayed automatically.

The db.Views solution proposed by phooey seems to be the right way to go, but I am not sure how to get them into the form so that they will be read when the homepage is called up.
Regards and thanks to all who are helping me.
0
 
phooeyCommented:
How familiar are you with script and agents?

Basically, you can pretty much use the script I gave above, but in an agent.

This agent is then called from the WebQueryOpen event on the form, an has the effect of populating a field with the views that exist.  You could actually use a javascrip document.write in your agent, but perhaps this is a bit far!

One other possible way, especailly if the views rarely change:

Create the agent to populate a field on a keyword form.
Use a standard @DBColumn on your web form to get the contents of this keyword.
You can then run the agent on schedule, or as neccessary and keep the view list as up to date as required.

This would have the added advantage of reducing overall server load.
0
 
HemanthaKumarCommented:
Hi Chris

You can use domino field to accomplish these, create a text field with name $$ViewList(Editable/Computed) in a form, which will list all the views in the current database when opened  on the browser. Use this form handle in the frameset.

Good Luck
~Hemanth
0
 
phooeyCommented:
Muck Fe, he's right you know !, so perhaps you could open the form from the lookup database and display this in your main databases frameset.
0
 
Chris_mAuthor Commented:
Hello HemanthaKumar!  Your solution displays the views perfectly, however, there is a small problem.  When I click on a view, the list of documents displays, but, when I select a document, I get a 404 Error .... File does not exist.  In fact, the file does exist, I can open the files if I access the database thru' a link.  What can the problem be?
0
 
HemanthaKumarCommented:
Hi Chris

I need to know what is the url link that is being displayed when u keep ur mouse pointer on the document link. Could u post the sample here.

OR

try to view the source of the document error & copy that and paste it here.

~Hemanth
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now