show view columns

I have a form, with a keywords field. I´d like that when I choose an item of the field ("345", for example), a view appears in the form, showing only that documents in which the "code" column has the same value of the item I´ve chosen ("345").
I´m trying to do it with embedded views, but I don´t know if it´s possible, because it shows all the documents of the view.
How can I select the documents I want ??

Thanks !
ptenutaAsked:
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.

HemanthaKumarCommented:
Could you please elaborate a bit, i.e. how ur passing the keyword field to viewbody.

Hemanth
0
ptenutaAuthor Commented:
Sorry , my English is as good as my Notes knowledgement ....

Actually I have a view which shows the documents included using form "A".
There is another form "B", which has the keywords field.

I want to choose an item of the keywords field, and show (inside form "B"), the documents of the view that has that item.

I´m not passing the keyword field to the viewbody. I just want to look in the view for documents that have a field that matches my keyword value. (And show them in my form).

Thanks!
0
HemanthaKumarCommented:
Alright Here is the logic,

Create an agent which collect all the documents that match the search criteria specified by the keyword field.

Then put all the collected documents in a folder called CustomFolder( Should be a personal on first use), which can be formatted as required. Open that folder.

PS: Clear all the documents from the folder before you populate the folder with the documents.

Hemanth
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

niraj_m_patelCommented:
Hi,

The criteria for ur result is:
the item which u search is the first colum in the view and is sorted.

After that put one computed for display field in ur form, write following formula as per ur field name:

temp:=@DbLookup("";Server:Database;View;item;column);
temp1:=@If(@IsError(temp);"";temp);
@If(temp1="";"[<i>]Not available.[</i>]";@Implode(temp1;@NewLine)).

When u select the item, i.e "345" and press Refresh button which has formula @Command([ViewRefreshFields]). the page is refreshed and u will get all the documents as per ur selected item.

If u don't get my answer properly then there is another way also, just go thru the design of the Disscussion database, they have the same logic.

Now u want to display view, ok so u have to put no. of Computed for Display field as much column u want to display, the formula will remain almost same without the "column" part.

in ur case the first column formula is:temp:=@DbLookup("";Server:Database;View;"345";1);
temp1:=@If(@IsError(temp);"";temp);
@If(temp1="";"[<i>]Not available.[</i>]";@Implode(temp1;@NewLine)).

TIA
-Niraj.
0
ptenutaAuthor Commented:
Niraj, I´ve tried to implement your answer, but I just get a "Not available" message .
It seems dblookup is not working ...
Here is my code :
temp := @DbLookup("";milos:supvir.nsf;viewprodnome;"Frios";1);
temp1:=@If(@IsError(temp);"";temp);
@If(temp1="";"Not available";@Implode(temp1;@NewLine))

I´ve put the item I want to search in the first column of the view, and it´s sorted.
How can I debug/test dblookup ??
0
ptenutaAuthor Commented:
Niraj, it worked now.
But I´m afraid it´s not exactly what I want. I need for each row a checkbox, in order to make it possible to a user selects what he wants.
And then I need to store these selected rows somewhere.
Is it possible to implement with this solution you gave me ??

Thanks !
0
ptenutaAuthor Commented:
I don´t know Notes very well, so I found it difficult to implement. That´s why I chose the other way.
0
HemanthaKumarCommented:
I don't suggest the the usage of @DbLookup for building up the list of document links on a form, because it may exceed 64K of size limit very easily.

So try to follow what I have proposed earlier. If u need more details on how to.?.let me know.

Hemanth
0
johnkeanCommented:
I think you need to use a single category view and pass the field selection as the key to the embedded view. That way it should only bring back the documents that have that value in its first sorted column. Let me know if you need more info.
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
skancherlaCommented:
Hi ptenuta,
Your problem can be solved by choosing
Show single category as the event in embedded views(in Programmer's pane of  the form)
You can restrict an embedded view to a single category.
1.Choose "Show Single Category" as the event in the Programmer's pane.
2.Enter a formula to compute the category. (eg: @text(your keyword field name))

The formula can make use of information about the current user and information from the current document (the one embedding the view).
For the Show Single Category option to work, the embedded view must first have been categorized . Note that the category name will not appear in the embedded view.  For example,  if you check the Show Single Category box for a category named Kitchen,  the embedded view will not have a line named Kitchen. Instead, you will see under Kitchen documents such as Stove, Refrigerator, and so on.
You cannot use @Commands with Show Single Category.

If you need more info. Pl let me know
0
johnkeanCommented:
Thanks for elaborating on what I was suggesting.
0
skancherlaCommented:
It is upto ptenuta to accept my elaborated answer.
0
niraj_m_patelCommented:
Hi ptenuta,

Sorry for not replying u from longtime, 'cause i forgot the question subject, don't u think that exeperts-exchange can provide add to favourite like of link so the search is shorten, hey it's just my idea, sounds it funny?

now here is your interested part:

You can generate CheckBox in view and access document with that checkbox.

1) Create a form with at least two fields. First field is
called Key. It is a compute when composed field with a
default value of @Text(@DocumentUniqueID). The second
field is called Title. It is the document title and should be defined
as an editable text field.
2) Create a view from which your web users will select the
documents created in step one. This view will have only one
column with the following formula:
"[<INPUT TYPE=checkbox NAME=\""+"Selections"+"\"
VALUE=\""+KEY+"\">"+TITLE+"<BR>]"
The KEY and TITLE field in this formula come from the form
created above. Make the view a "Treat View Content as HTML"
This attribute is found under the View beanie.
3) Create a form with a field called "selections".
This field should be an editable text field with the multi-values
option enabled. Hide the field from the web browser.

4) Create an embedded view in the form you created in (3).
Select the view you created in 2.
5) On your web site, add an action that will create a document
with the form created in (3).

Now each time a form with the embedded view is submitted,
the field "selections" will contain all document keys that the
user selected. It is now easy to write scripts or agents that
will act upon those documents.

TIA
-Niraj
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.