Display All Respones of a Doc on the Web

Hi,

Would anyone have code or idea how I could present a “picklist” window for a user to see all the respones for an open doc and be able to click in the list to open a response.

Here is a little background. User can click a Search button and get a list of docs matching his search. When he opens a doc he also needs to be able to see all of its responses and be able to open any of them.

So I hope to put a button on the main doc that will do the action described in the first paragraph above.

I need this to work on the web but would be good if it also work on the client.

Thanks very much,

Tim

Subject: Display All Respones of a Doc on the Web

You can add a field called UniqueKey (computed when composed) to the main document. The formula should be @Unique. Then add a field called ParentKey (computed when composed) to the child documents that inherits the value of UniqueKey from the parent document. Then you can set up a single category view, categorized by UniqueKey, that selects all of the children documents. You can then either embed the view on a form or use an

Subject: RE: Display All Respones of a Doc on the Web

Thanks Timothy for the feedback and different options to explore.

Am leaning towards the

Subject: RE: Display All Respones of a Doc on the Web

If you are looking to have the list of response documents open in a separate window, you can simply have a link/button which opens the single category view. You can create a form called “Response List” or whatever, embed the view and set the category you want to display (pull it from the url param).You can either use the RestrictToCategory url param or create your own like &ParentKey=. If you use your own, you will need to capture the value of that param using @UrlQueryString(“ParentKey”) in a field and then pass that to your single category embedded view.

Use the following code in your button/link:

url = “/server/db/Response+List?ReadForm&ParentKey=”

Click Here to View Responses

You can use the javascript below to open a new window…

function NewWindow(mypage,myname,w,h,scroll){

var winl = (screen.width-w)/2;

var wint = (screen.height-h)/2;

var settings =‘height=’+h+‘,’;

settings +=‘width=’+w+‘,’;

settings +=‘top=’+wint+‘,’;

settings +=‘left=’+winl+‘,’;

settings +=‘scrollbars=’+scroll+‘,’;

settings +=‘resizable=yes’;

win=window.open(mypage,myname,settings);

win.window.focus();

}

I hope that all makes sense. If you need further clarification, let mw know.

Subject: RE: Display All Respones of a Doc on the Web

Thanks Timothy for the code. It was a bit more than I expected; and, hopefully not more than I can figure out.

If you would not mind providing your email just in case I get stuck later when I try making this work.

Thanks again,

Tim

Subject: RE: Display All Respones of a Doc on the Web

No worries.

Subject: RE: Display All Respones of a Doc on the Web

If you do have a sample I would love to see it. My email is timwholt@netscape.net.

May also give you a call after I take a look at it.

Thanks for all your help. It will come in very handy.

Tim