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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 66

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard