web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Enable dropdown value ...
Power Pages
Answered

Enable dropdown value depends on web role

(0) ShareShare
ReportReport
Posted on by 7,044 Most Valuable Professional

Hello Experts, 

 

      I have a scenario where I need to display and enable only one value depends on the web role. Here is the detailed scenario. 

I have a web page where I am currently having Checkbox (achieved through meta data) where a manger can choose multiple choice. 

The business rule is changing. Hence I need to restrict each manger, and allowing them to select only one value. I thought may be this is possible through dropdown. But open to any kind of solution. 

 

Currently I have a SharePoint list where my list contains manager email address and the values they can choose. Is there anyway I can integrate this list to CDS to achieve the above scenario ? 

In a nutshell, what is the best way to solve the problem ? 

 

Thanks 

 

 

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at

    Hi, I don't really think you can achieve that using normal Portals configuration

    you can apply JS and filter the options based on the user's role

    the following JS is an example on how to check the web roles for the signed-in user:

    $(document).ready(function () {
    var roles = "{{ user.roles }}";
    var isAdmin = "{{ user | has_role: 'Administrators' }}"
    console.log("Is Admin: " + isAdmin);
    console.log("User Roles: " + roles);
    });

     

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Thanks @OliverRodrigues , It helped a lot to write my custom logic to achieve what we wanted to do. But I think I am half way through to achieve this. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard