?
Solved

show view columns

Posted on 1999-12-03
13
Medium Priority
?
423 Views
Last Modified: 2013-12-18
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 !
0
Comment
Question by:ptenuta
  • 4
  • 3
  • 2
  • +2
13 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2253608
Could you please elaborate a bit, i.e. how ur passing the keyword field to viewbody.

Hemanth
0
 

Author Comment

by:ptenuta
ID: 2253641
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
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2253791
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 

Expert Comment

by:niraj_m_patel
ID: 2254772
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
 

Author Comment

by:ptenuta
ID: 2258303
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
 

Author Comment

by:ptenuta
ID: 2261516
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
 

Author Comment

by:ptenuta
ID: 2261519
I don´t know Notes very well, so I found it difficult to implement. That´s why I chose the other way.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2268679
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
 

Accepted Solution

by:
johnkean earned 140 total points
ID: 2277279
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
 

Expert Comment

by:skancherla
ID: 2284410
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
 

Expert Comment

by:johnkean
ID: 2284429
Thanks for elaborating on what I was suggesting.
0
 

Expert Comment

by:skancherla
ID: 2284743
It is upto ptenuta to accept my elaborated answer.
0
 

Expert Comment

by:niraj_m_patel
ID: 2325405
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

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

599 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