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 Apps / Created by field popul...
Power Apps
Unanswered

Created by field populated differently with lookup vs selecting a record from gallery

(0) ShareShare
ReportReport
Posted on by 12

Hi guys,

 

I have an app with a gallery that lists records from Table A from dataverse. When selecting a record, the user is taken to a screen where the record can be edited. The user is however only allowed to edit records that he himself has created (and view records others have created). The user can also create a new record, after which the user is taken to the edit screen.

 

In order to evaluate whether the record is created by the user or not, the created by field from the "current_record" global variable is compared to the User() function. The comparison is as follows: current_record.UserName = User().Email.

 

This works fine when selecting a record from the gallery, but when I set the variable in the Patch function in the new record creating (or as I tried, to set it again with lookup), the created by field is missing this .UserName column (it only shows "fullname" and "systemuserid", which can not be compared to any User() attribute). So PowerApps seems to limit the amount of columns that are shown in this record from the created by lookup column (which is a lookup to the User table, standard dataverse table).


Any ideas how to show more columns with this lookup / patch, or some other way to compare the user data?

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @ossidabossi 

     

    One of the limitations that Canvas App has is the amount of records it can return and that is 2000, if you have more than that amount the search only returns the first ones.

    In this sense that field you are using as a search field, you will have to use some kind of filter with non-delegable formulas so that you can limit the number of records that should be returned.

    There are many techniques that will allow you to do this, but the first thing you need to do is understand delegation.

    https://learn.microsoft.com/es-es/power-apps/maker/canvas-apps/delegation-overview

     

    An example of how to resolve delegation

    https://www.youtube.com/watch?v=2cKcylsGlPg

     

     

     

  • ossidabossi Profile Picture
    12 on at

    This problem is not about delegation. It is actually about the "Explicit column selection" that can be found in the Upcoming features of the Settings. This feature limits the columns of retrieved data to the ones that are actually in use. In this case however, I would like to force it to retrieve data ('User Name' from the User table). 

    I actually solved this by setting the User Name into a global variable. This way the app understands that this column is being used and retrieves that from the database. I was looking for a solution where this can be done in the code where I set the context variable but seems like that is not possible.

    Thanks for the help anyway.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard