• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

private view on Web

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
sampa
Asked:
sampa
  • 4
  • 2
  • 2
  • +1
1 Solution
 
ArunkumarCommented:
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
 
ArunkumarCommented:
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
 
ArunkumarCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
zvonkoCommented:
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
 
ArunkumarCommented:
Bro!

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

;-)
0
 
sampaAuthor Commented:
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
 
sampaAuthor Commented:
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
 
zvonkoCommented:
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
 
ZvonkoSystems architectCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now