cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hmedhat
Helper II
Helper II

Powerapps portalAssociate current portal user vs a text field in my entity

PowerApps Portal

1-I created an entity for records I get the data from the SQL and there is a column called UserEmail in this entity type text.

I want when I user sign in to my portal i want him to see his only records according to UserEmail Field.

 

My issue is when I selected Associate current portal user  it's need a lookupfield and my UserEmail is a textField .

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User
Super User
4 REPLIES 4
EricRegnier
Super User
Super User

v-xida-msft
Community Support
Community Support

Hi @hmedhat ,

Could you please show more details about your scenario?

Do you want to filter the records within the Entity List in your Portal based on the UserEmail Field?

 

Regarding the needs that you mentioned, I think you want to filter your Entity List records based on the UserEmail field value against the current sign in user?

 

Currently, I afraid that there is no direct way to achieve your needs in Power Apps Portal. As an possible solution, you could consider add a Contact LookUp field in your Entity, then bind each record in your Entity to proper Contact record. Then you could configure the "Portal User Attribute" to this Contact LookUp field under the "Filter Conditions" part of General tab of your Entity List, then your Entity List records would be filtered by the current sign in user:

3.JPG

please check and see if the following thread would help in your scenario:

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/266160/how-to-filter-entity-list-r...

 

As another possible solution, you could consider try the Liquid expression to achieve your needs. You could use the following Liquid expression to render a Entity List in your Portal screen:

{% entitylist id:page.adx_entitylist.id %}
{% endentitylist %}

Then you could use EntityView Liquid object to render Entity records in your Portal screen (Put the EntityView Liquid object inside the entitylist tag):

{% entityview id:xxxx %}
{% endentityview %}

then you could apply metafilter to the EntityView.

Please check and see if the following article would help in your scenario:

https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-entity-list-current-page

https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/portals-entity-tags#entitylist

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-xida-msft 

 

Thanks @EricRegnier .

 

First you can't register duplicate emails second you are right i want to filter based on the login user email vs a text field in my entity .

Example :

name          email              age    role

hanihani.ds@r.com32a
ericeric.asd@df.com31a
alexalex.asd@sad.com28b
hanihani.ds@r.com32c
ericeric.asd@df.com31d

 

I want to filter the view for the above entity with column email with the login portal user .knowing that the email is a text field.

Hi @hmedhat ,

Have you tried the solution @justinburch provided in the following thread?

 

https://powerusers.microsoft.com/t5/Power-Apps-Portals/Associate-current-portal-user-vs-a-text-field...

 

Please try the solution @@justinburch provided in above thread link. I agree with his thought almost. Please try it, then check if the issue is solved.

Note: Currently, I afraid that there is no direct solution to achieve your needs in Power Apps Portal.

 

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,332)