Jump to content
  • 0
Carlvz

Dropdown menu contains records based on the role of the user

Question

I have a datapage with a dropdown menu, than contains all of our records.  It's getting long.  We have people with different roles who only need to see subsets of our records (certain portfolios, not the whole database).  For example, Allison needs to be able to search and work with the records in the Allison portfolio, Jodi needs to work with those in the Jodi portfolio, and Carl needs to work with all records.  Each is a user and each has a portfolio specified in the authentication table.  

When Allison logs in and sees the search page, I would like her to see only her records in the dropdown menu.  Same for Jodi.  But for Carl, he should see all of them.  This is akin to a sales manager who sees all, and each salesperson who only sees their accounts.  

This is not a security issue, just a usability issue.  I tried to do this with record level security, but I haven't found a way for Carl to see all records.  

Help?

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @Carlvz,

Try to enable "Filter data based on pre-defined criteria, Bridge and external parametersand on the "Configure Filtering Fields" screen on the advanced tab select 
Authentication Filed parameter and if the parameter is empty,  match all records. Please see the screenshot below for better understanding:
image.png.9dbcf8eb63bc1cf0fed7fbd3a27bbc54.png



Record Level Security needs to be turned off:image.png.ebaf25c1b27b904835a7cee02670f5ef.png

Share this post


Link to post
Share on other sites
  • 0

Thanks Alison, I've been playing around with your suggestion.  I think if I go this route, the user cannot do a manual search, which I need.  

I think there might be several ways of doing this. 

My basic need is that I have a datapage with a dropdown menu in the search page that lists every record in the associated table.  The dropdown menu is long.  I'd like each portfolio manager to only have their records showing in the dropdown menu.  So my authentication table has a field "portfolio", which indicates what portfolio is assigned to the user, and my data table that the DataPage is built on has a "portfolio" field to indicate what portfolio it belongs to.  (I could also do this with User Name in the authentication table...)  

I thought I could do that with record level security.  But, their general manager needs to be able to work with all the records, regardless of portfolio, so he needs to have the dropdown menu show all the records.   I can't figure out if there's a way to do that.  

Thanks so much for your help.

 

 

Share this post


Link to post
Share on other sites
  • 0

Hello @Carlvz,

In that case, you will need two datapages:

1. The first one with the record level security for the dropdowns: 
Create_a_workflow_using_RLS_and_filtered_dropdowns_10.png
https://howto.caspio.com/authentications-and-connections/authentication/record-level-security/create-a-workflow-using-record-level-security-and-filtered-dropdown/

2. The second one without record level security to allow the manager viewing all the records.

You should create an HTML datapage with the redirection after login in. How to do it, please follow these articles:
https://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/
https://howto.caspio.com/getting-started/create-user-specific-redirect-after-login/

Hope it helps. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...