Solved

private view on Web

Posted on 2002-06-28
10
255 Views
Last Modified: 2013-12-18
I have got a main document which has a field called Authorized Users.The person who creates the main document can authorize people who can create responses to it.
Now i want to create a view which will show all the main documents but will display an icon next to the doc to which the logged in user is authorized to create a response.
In case of Notes client i have created a shared private on first use view and it is working fine.
On the Web I am unable to get this view.
What is the alternative on the web?
0
Comment
Question by:sampa
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 9

Accepted Solution

by:
Arunkumar earned 50 total points
ID: 7116089
Few things from notes.net...

============
On the web, the easiest option to manage is to embed the view on a form called $$ViewTemplate for <ViewName>, and put a username field on the form. Categorize the view by username field, and enter the username field's name in the "Show Single Category" option of the embedded view.
============
What about revealing what you are trying to achieve. That may give us all a chance to help you...

Maybe you could use Single category view, with a URL like:

db/view?OpenView&RestrictToCategory=aUserNameHere

to show only that user's documents.
Note that the view will have to have an initial categorized column, listing user name, for this to work.
===========

Well will post if i get more !

-Arun.





0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7116097
This may be useful to someone out there:
I was trying to figure out a way to filter a view's contents based on the user name. Simple enough in the client (i.e., shared private on first use view w/ the selection formula based on the user name). The shared version will not work, and the private version will not work on the web.

SOLUTION: Create a page w/ an embedded view, and set the singlecategory property to the user name. It filters perfectly for both web & client.

Hope this helps someone...

Thanks.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7116098
Create a view categorized by the username in the "Leave" Form.
Create a new form with the view embedded.
Create a field on the new form that computes to the username.
Look in the view properties, under "Show Single Category" and put the field name in there.

When a user opens the form with the embedded view, they only see their category (=username)


Hope that helps...
0
Gigs: Get Your Project Delivered by an Expert

Select from 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.

 
LVL 10

Expert Comment

by:zvonko
ID: 7116184
Hello sampa, hello Arun,

when I have understood you right, then is Arun's proposal helpful but not what you asked for.
Arun proposed to show to user only documents for which user is allowed to respond. I understood you would like to have a button next to those document to allow web users to respond.

I have an (working :) idea how it can be done but I would ask you 300 points for it. My idea would provide buttons in a web view (but only in web). Is this interesting for you?

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7116190
Bro!

Dont confuse him. And dont worry I will let you pass me okay ?

;-)
0
 

Author Comment

by:sampa
ID: 7117757
I want to create a view which will display all main documents to any user logged in but beside but there is a column which displays an icon based on whether the user can attach a response to it.
In the column which has got an icon i have this formula written:
@If(@IsMember(@Name([Abbreviate];@UserName);FNAuthorizedUsers);1;0)

It works fine with shared private on first use on the client but does not work on the web.
I have created an embedded view in a page but still does not work.It always shows me admin in a username column.
This view which is embedded has been categorized on dept and location of the user.

 
0
 

Author Comment

by:sampa
ID: 7117765
Arun I checked out ur single category coluimn with Username works but it does not exactly meet my requirement.

I am not "he" but "she"
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7136001
Hello Sampa,

I just sent you a working example for your view button question.

Here again for all readers the description.

You have a Main document with a field: FNAuthorizedUsers
You want to have a button in a view openning ResponseDoc form with the parent ID of every main document where the current web user is contained in the field FNAuthorizedUsers with his CommonName.

So you need a column with this formula in desired view:
"[<script>checkAndShowButton(\'"+FNAuthorizedUsers+"\',\'"+@Text(@DocumentUniqueID)+"\')</script>]"

You need a form to display this view. Either use the $$ViewTemplateDefault form or create dedicated form four your view name. Then the form has to be named: $$ViewTemplate for ViewWithButton

(where ViewWithButton is to be changed to the name of your view with button :)


This form needs two extra definitions.
In the HTMLHeadContent section place this formula:
"[<script>"+
"var CurrentUser=\'"+@Name([CN];@UserName)+"\';"+
"var ResponseDoc=\'/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/ResponseDoc?OpenForm&ParentUNID=\';"+
"</script>]"

And into JSHeader section place this function:
function checkAndShowButton(AuthorList,DocID) {
 if (AuthorList.search(CurrentUser) > -1)
 document.write('<input type=button value="CreateResonse" onClick="window.open(\''+ResponseDoc+DocID+'\')" >')
}

That is all.

So when your view with the main documents and this adapted column is displayed then will JavaScript calculate on the fly where to show the button and where not.

If you have questions about this proposal please ask.
Otherwise please increase the points to 300 and give me an A+ :)

So long,
zvonko

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11250662
sampa,
No comment has been added to this question in more than 701 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

RECOMMENDATION: Award points to Arunkumar http:#7116089

Any objections should be posted here in the next  4  days. After that time, the question will be closed.

Thanks,
Zvonko
EE Cleanup Volunteer
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from 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

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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