Skip to main content

Notifications

Power Pages - Security
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:
  • RK2021 Profile Picture
    RK2021 45 on at
    Using the contacts as a lookup in the form but restricting the list based on the roles
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics