How do I use a single page to display a single category view - and change the category

Hi, I am creating a dashboard application. Main page shows 4 embedded views each set to single category. The category that they show is hardcoded as the dept name.

I'm using a frameset with two frames.
The first contains an outline embedded on a page.
This loads the required dept page in the second frame

What I'm doing is defining one page for each dept with hardcoded single category views on it.
I'd love to be able to have one generic page that I can specify the category on ... but of course pages can't contain fields can they ?
How can i work around this ?

With Thanks - Andy
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.

Sjef BosmanGroupware ConsultantCommented:
Use a form...?
andyhinesAuthor Commented:
Sorry sjef maybe I'm asking a dumb question. I've always used pages rather than forms when I'm creating applications for dual web/Notes use (and I didn't say that was what I'm doing in the question).
If I use a form then how do I specify in the outline that I want to load a blank copy of the form and then set certain fields (such as the dept name) and refresh in order to make the form show the right information ? In formula language if possible.
Otherwise is there no way to use an environment variable to set the dept name and then change it programmatically ?

Thanks - Andy
Sjef BosmanGroupware ConsultantCommented:
The environment variable is not a good idea if it's a dual web/Notes application, which of course isn't what you're doing here ;-))

You can do with a form almost anything that you can do with a page. What you have to take care of is that there are no editable fields (visible) on the form, and that the form cannot be saved.

> ... load a blank copy of the form and then set certain fields  ...
Would it be possible that these fields set themselves? Or you put some buttons on the form, that set the fields and then activate some refresh mechanism? I never tried this, but it would be the way I'd go.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

andyhinesAuthor Commented:
Hi Sjef,

I have changed the app to use a form not a page. There is only one real field on the form (Dept_Name) and all the embedded views are keyed off this.
I have the following code on an outline element :
@Command( [EditDocument] ; 1 );
@SetField("Dept_Name";"Sales - Rollup");
which I expected would update the one field, change the Dept and make all the views refresh. It doesn't seem to do anything.
If instead of editing the document I do a Compose then it does give me a blank form but still doesn't change the contents of Dept_Name.

Am I missing something ? Thanks - Andy
Sjef BosmanGroupware ConsultantCommented:
If you have a test database and you're willing to share it with me, you can send it to the mail address displayed in my profile.

Am I correct in  understanding that you want ALL views to show the same category?

Anyway, the settargetframe function has no direct bearing to the commands that follow, only when a link is clicked. Check the function @UpdateFormulaContext  
The embedded view name and single-category must be available to the form as the form loads.  You cannot change the embedded view name or single-category while the form is open.

In the Notes Client, you will need to set an Environment Variable in your action, then read/clear it in the form's embedded view.

For a web app, you can pass the info as a URL parameter, then set the data in the form's WebQueryOpen event.
Sjef BosmanGroupware ConsultantCommented:
I tend to disagree again. I just tested with a form, with a computed field, an embedded view and a button. The button changes the computed field, and that computed field is used in the single category formula of the embedded view. After the change, the form is refreshed, and as expected the contents of the embedded views are changed.

What probably never works is the outline in one frame and the form in another one. Sometimes, Notes mucho sucko... :-))

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
andyhinesAuthor Commented:
Hi Sjef - Thanks for your help.
I received my database back on Sat. and have just tested the changes in the real one.
It DOES work better using a single form as you suggested and this saves me the grief of maintaining any number of pages.
Thanks a lot. Especially for taking a look over the weekend.

andyhinesAuthor Commented:
Cheers :)
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.