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

Community site session details

Session Id :
Power Pages - General Discussions
Suggested answer

Filter on current user email

(0) ShareShare
ReportReport
Posted on by 40
Hi,
 
I'm trying to apply a filter based on the currently logged in user's first name. I also need email as well, but that was not working either.
 
Here are all the different syntax I have tried and nothing works. When I hard code the first name for the value it works, so it is comparing the attribute correctly. I just need to know how to call the firstname in the contact table.
 
<filter type="and">
  <condition attribute="primarypresenteremail" operator="eq" value="{!usercontact/emailaddress1}" />
</filter>

<filter type="and">
  <condition attribute="primarypresenteremail" operator="eq" value="{{ user.emailaddress1 }}" />
</filter>

<filter type="and">
  <condition attribute="primarypresenteremail" operator="eq-useremail" />
</filter>
Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    4,478 Super User 2025 Season 2 on at
    Filter on current user email
     
    You cannot directly use {!usercontact/emailaddress1} or {{ user.emailaddress1 }} in FetchXML. Instead, you need to use the @me keyword or retrieve the user context separately.
    <filter type="and">
      <condition attribute="primarypresenteremail" operator="eq" value="@me" />
    </filter>
     
     
  • Suggested answer
    MS.Ragavendar Profile Picture
    4,478 Super User 2025 Season 2 on at
    Filter on current user email
     
    A quick follow-up to see, does the suggestion worked for you or still you were looking for any other approaches or assistance.
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • CourtneyPowell Profile Picture
    40 on at
    Filter on current user email
    @MS.Ragavendar, it gave me an error. That's an improvement from what I had before, which was nothing. I've gone another route. I'm not sure if I should post a new question or not...
     
    I've created a new table. I have an automated cloud flow that will add a row to the new table once information from the main form/table is submitted. The issue i'm having now is that my Reviewer column is a lookup. It appears that the Contact table only recognizes the Full Name, not the email. I'm asking on the form for the email so when a person registers for the PowerPages site, it will match up with their email.
     
    Or am I going about this incorrectly?
     
    Background:
    This is an online application. The reviewer is supposed to log on and see all the applications that are assigned to them via the Reviewer Email field.
     
  • Suggested answer
    Fubar Profile Picture
    8,232 Super User 2025 Season 2 on at
    Filter on current user email
    You are probably approaching it in the wrong way.
     
    The system is based on Contact & Account records (including the security model). The linkages (relationships/lookups are not on name, but the records GUID).
     
    What you really want is rather than an email address, is a Contact record e.g. Contact Lookup (that you will populate with the Primary Presenter's contact record - i.e. your Primary Presenter should be a Contact).
     
    When a user is registered, if they were invited the system automatically links them to their contact record (or if no contact creates a Contact record for them) i.e. User == a dataverse Contact.
     
    You can actually run the query that you are currently trying to but not using the standard list etc, you can do it using either Liquid fetchxml, Portals Web API or Power Pages Flow, so its not that you can't get the data, its just that you will need to manage the presentation of the results rather than using the standard List or forms. 
     
    Edit: I am unclear on what your actual use case is but based on this statement "I'm asking on the form for the email so when a person registers for the PowerPages site, it will match up with their email." I would create a Contact in dataverse for the Presenters and then use the Send Invitation functionalty to send them an email to register. Also, depending on the authentication provider you are using, you may also find an advanced power pages setting exists (e.g. their is one for Azure/Entra) to use automatically match a registration to an existing contact using the email address (but for this to work you need to be sure email addresses are unique and that you won't accidently link to an incorrect Contact record).

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Pages

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 41 Super User 2025 Season 2

#1
Jerry-IN Profile Picture

Jerry-IN 41

#3
Fubar Profile Picture

Fubar 35 Super User 2025 Season 2

Last 30 days Overall leaderboard