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 / Using the contacts as ...
Power Pages
Unanswered

Using the contacts as a lookup in the form but restricting the list based on the roles

(0) ShareShare
ReportReport
Posted on by
Hello,
I have a use case where my core contact table contains the users that are parent, teacher and admin (consider a small training center). I want to create some forms which serves the following purposes:
 
1. a form to input attendance, so admin will select student (from different custom table) and teacher (from the contact table) and input the duration the class was conducted.
2. a form for student profile where the admin will create new student and assign parents to them (those will be created forehand) .
 
In both cases I need the contact lookup to be filtered on the 'web role', how i can achieve this?? How I can make a contact view where I can have name along with web role so I can use that list as lookup and do further filtering on the form level? 
 
Categories:
I have the same question (0)
  • RK2021 Profile Picture
    91 on at
    To create the view, you would create this in Dataverse on the Contact table and then use this view in the lookup on the form. If you don't want to show the web role, you may wish to have a few views which filter on the web role i.e. has teacher web role, has parent web role.
     
    You can then filter further using JavaScript if necessary.
     
    My advice more generally would be to avoid using web role as the filter. It may be more suitable to have a choice column on Contact which denotes the type i.e. teacher, parent, etc? This would be easier to filter on for your lookup views, as you're not filtering via another table (adx_webrole) with an N:N relationship.

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!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 14 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 13

Last 30 days Overall leaderboard