Project and Portfolio Management Practitioners Forum
cancel

set fields of a request only visible to specific users based on a result of a specific field

SOLVED
Go to solution
Highlighted
kndlny
Super Contributor.

set fields of a request only visible to specific users based on a result of a specific field

Hi,

 

I have created a new field called "Confidential" and if the value "yes" is selected, all the info in this request should only be visible to specific users.

 

I have tried to do this via Request Type Rules with the UI rule "setFieldVisible". But I have no idea how to bind this rule to some token which specifies the security group that I will define. Do I need to define a new function to "RequestRulesUserLibrary.js" or is there another way.

 

Any ideas?

 

Thanks.

4 REPLIES
Erik Cole
Acclaimed Contributor.
Solution

Re: set fields of a request only visible to specific users based on a result of a specific field

You said "all the info in this request" so if you mean the entire request, and not just parts of it, then what you can do is create a hidden text field and have your rule populate it with a security group name. In the request type security, add this field's token to the list of security groups able to view/edit. You'll have to do the logic in reverse; ie, restrict the form by default, and have the rule add the "all users" security group when you select "NO" to the "confidential" question, and remove it when you select "YES". You can still make the field defaults such as to make the requests visible by default.

kndlny
Super Contributor.

Re: set fields of a request only visible to specific users based on a result of a specific field

Request will be visible but the details will not. (request id, name will be displayed on the homepage) If an undesired user clicks the request, s\he will get a pop up warning instead of details of the request. What you suggest will probably hide the request itself. And by "request type security", did you mean the "User Access" tab?

 

Thanks

Erik Cole
Acclaimed Contributor.

Re: set fields of a request only visible to specific users based on a result of a specific field

Yes, the User Access tab. This method will indeed hide the request.

You could use the same method though and instead of adding the token to the User Access, add it (as a custom token) to the field-level security of the fields you wish to affect. Not sure how to do a pop-up warning though.

kndlny
Super Contributor.

Re: set fields of a request only visible to specific users based on a result of a specific field

The first solution will do it.

 

Thanks a lot.