Solved

How to display selected category in a form for each different user

Posted on 2004-08-18
16
139 Views
Last Modified: 2013-12-18
I have a form and on this form, there is a dialog list field called meetingtype which gets the value from another view. The values are Manager,Sales, Supervisor,Employee,Other.

I have created roles for this database - Manager, Sales, Supervisor, Employee, Other.
How do I code my meetingtype field or my form such that when user A access this db, user A roles are Employee and Other so when user A create this form, when he click on the meetingtype field, it will show Employee and Other and no other values.
When another user B Supervisor access this db, user B roles are Supervisor,Employee and Other.So when user B creates this form, when he click on the meetingtype field, it will show Supervisor,Employee and Other.

Pls help.
Thanks.
0
Comment
Question by:kopibean
  • 7
  • 6
  • 2
16 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 11828242
u need to use:
@If(@Ismember(@Userroles;"[Manager]");"All":"A":"B":"C";@Ismember(@Userroles;"[Sales]");"A":"B":"C";"C")

Like that u need to code in your field. this formula cjange according to your needs(roles and choices)

Select the field as DialogList
and in second tab: useFormula for choises.

and use the code.
0
 

Author Comment

by:kopibean
ID: 11828633
madheeswar,
I tried your code but it seems to be not working.
When user A with [Manager] role, he should be able to see Supervisor,Employee,Other in the field meetingtype or
When user B with [Sales] role, he should be able to see only Employee, Other in the field meetingtype.
But it shows Other in the field meetingtype when both user create the form.
Is there anything wrong??
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11828662
use this:
@If(@Ismember(@Userroles;"[Manager]");"Supervisor":"Employee":"Other";@Ismember(@Userroles;"[Sales]");"Employee":"Other";"Nothing")

In your comment above u stated that it it is manager/Sales it should display Others also as choice.

If you don't want others, then remove it from the formula.
Even we can do the above formula using @Subset. But the code provided will be easy to understand for newbie's.

What is the formula you are using? If the above doesn't works, then paste your code here.
0
 

Author Comment

by:kopibean
ID: 11828725
madheeswar,
i paste your code into the editable dialog list field and when user A is [Manager], it display nothing.
when another user B is [Sales], it also disaply nothing.

If user is [Manager], it will show Manager,Sales, Supervisor,Employee,Other
If user is [Sales], it will show Sales,Employee,Other
If user is [Employee], it will show Employee, Other

But these values(Manager,Sales, Supervisor,Employee,Other ) is get from another view where user can key in more values.
THus is there way to retrieve value from the view rather than hard code in the field?

Thanks!
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11828792
>>But these values(Manager,Sales, Supervisor,Employee,Other ) is get from another view where user can key in more values.
THus is there way to retrieve value from the view rather than hard code in the field?
<<<

this you need to tell FIRST.

Create a form and have three fields.(name it choiceform)
Type of Category: type_x (Editable,text) 'here users will enter what type of category they want to show on the form.i.e., newly created

Who need to see: view_x (Keywords,Multivalue. hardcode choices: All the roles with Square Braces) Enter the roles

readers field: readers_x  (Computed, text, multivalue. separator semicolon) and default value is: view_x

once u select roles in view_x, this value will be appended to readers field and the users who are having this role, can see the choices.

And create a view(name: choiceview). Selection formula:
Select Form="choiceform"

and in first column:
value is type_x


And on the original form for the meetintype field use this formula:

res:=@DbColumn("":"Nocache";"";"choiceview";1);
@if(@Iserror(res);"Error";res)


the above should work perfectly.
0
 

Author Comment

by:kopibean
ID: 11837126
madheeswar,

the field view_x should be a keyword field which is a dialog field where I key in all the roles?

When user A with role [Sales], he should only see Sales FC Meeting and Other but instead it display Manager's meeting,Sales FC Meeting and Other. Manager's meeting should not be displayed for him.

Is there anything that I miss?
Pls help.
THanks.
0
 

Author Comment

by:kopibean
ID: 11848825
Anyone can help me to solve this problem?
Pls advise.
THank you.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 19

Expert Comment

by:madheeswar
ID: 11849109
YEs. view_x holds all type of roles.

This will work. Did u tried?

0
 

Author Comment

by:kopibean
ID: 11849559
madheeswar,

I tried your solution. But it fails.
When user A with role [Sales], he should only see Sales FC Meeting and Other but instead it display Manager's meeting,Sales FC Meeting and Other. Manager's meeting should not be displayed for him.

Please kindly advise.
Thank you.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11849567
So, u created documents as I said and selected roles.

What readers_x is displaying values?

it should display values of roles.

And open the view(choiceview) which the above documents are stored. And enter as manager role. It should display only the documents which ur listed in the readersw_x field. Else ur not succeded. U have done something wrong in readers field.
0
 

Author Comment

by:kopibean
ID: 11866683
readers_x is displaying [Manager] when the meeting type is Manager's Meeting in choiceform.
If the meeting type entered is Sales FC Meeting,values of roles Sales and Manager are displayed

but on the meetingform, when user is [Sales] role, the meetintype field it display is Sales FC Meeting, Manager's Meeting which Manager's Meeting should not be displayed as user is [Sales] role.

Any idea?
Thanks.
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 70 total points
ID: 11867392
so, u mean person who is having role [Sales], is able to view Managers meeting ?

As I said u before, with the same role, r u able to view the document in view choiceview?
U should not view the document if u have Sales role enabled. if it is displaying, then readers_x is not a readers field at all.

U should select readers_x as readers type and computed. default value as admin (this is role for generic use)
Currnetly I don't have PC installed with Notes. Once I get it, I will send u a sample template.

In the meantime, test as what I said.

Thanks
0
 

Author Comment

by:kopibean
ID: 11876920
can you send me the sample template?

thank you very much.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 13004903
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: kopibean {http:#11876920}

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

Zvonko
EE Cleanup Volunteer
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 13004943
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: madheeswar {http:#11867392}

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

Zvonko
EE Cleanup Volunteer

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now