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 / Look Up Function retur...
Power Apps
Unanswered

Look Up Function returns largely blank record

(0) ShareShare
ReportReport
Posted on by 4

I am developing in PowerApps for Teams and using Dataverse for Teams as my data source. I am able to properly set a variable by selecting an item from a Gallery :

 

Set(varSelecetedTournament, TournamentGallery.Selected)

 

but this will not work for the OnStart property of the App.  I know the record I want to select for the variable.  The LookUp function seems ideal:

 

Set(varSelectedTournament, LookUp(Tournaments, 'Tournament Sanction'=1234567))

 

This returns the correct record, but the vast majority of the columns are blank.  Only the TournamentSaction and TournamentID columns are populated, all the others are blank.  When I change the function it returns a value:

 

Set(varSelectedTournament, LookUp(Tournaments, 'Tournament Sanction'=1234567,'Tournament Name'))

 

How can I get the whole record? Does anyone know what I'm doing wrong?

Thank you for your help.

Ken

 

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @KenHorwedel 

    If you have the Explicit column selection setting under Preview turned on, then only those columns are fetched which are being used in the app. One option is to have a gallery or a label or something that uses all the columns you need. Then the columns will be populated. Or you can turn off the setting but keep in mind that there could be performance implications. 

     

    Try these options and let me know if either of them works for you. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • PaulD1 Profile Picture
    2,914 on at

    Agree that this looks a lot like 'Explicit Column Selection' in action. This feature has been in development (available as an 'upcoming feature) for about three years now I think. Based on my experiences with it over that time I thoroughly recommend turning it off.

  • KenHorwedel Profile Picture
    4 on at

    Thank you all for your suggestions.  My google research also pointed to the Explicit Column Selection setting as the likely culprit.  I don't see the option for Explicit Column Selection in the Preview list of options. Is it called something else in PowerApps for Teams? Is there another setting that I should consider disabling?

    Thanks,

    Ken

    KenHorwedel_0-1645810776218.pngKenHorwedel_1-1645810908566.pngKenHorwedel_2-1645810979013.pngKenHorwedel_3-1645811024488.png

     

  • KenHorwedel Profile Picture
    4 on at

    Thank you for your suggestion concerning my issue.  I am unable to find the Explicit column selection setting, and the problem is not, as I initially thought, only limited to the lookup function. Where the Items Property for my Gallery is the entire entity, 'Tournaments'

    Set(varSelectedTournament, ThisItem) for the OnSelect Property returns a largely blank data set too.  From what I can tell, any column that is not displayed in the gallery is not populated in the variable.  Is that the expected behavior?  How can I set the variable to be the entire record without displaying each column in the Gallery?

     

  • mike_a Profile Picture
    51 on at

    Hello -

     

    Any update on this? I seem to be having the same issue as Ken. I have an app developed in "Dataverse for teams" that operates as desired in the development environment, however the database entries are not being displayed by the gallery when published. As mentioned by Ken, the poplar answer seems to be to disable the "explicit column setting", however I cannot find this option within "Dataverse for teams". Any help would be much appreciated. 

    thanks, -mike.

  • mike_a Profile Picture
    51 on at

    Hello again -

     

    I have an update on this. I have not been able to resolve the issue, however I have found more information that may help address the issue.

    I have a gallery that is populated with items from a database, with the items to be shown in the gallery filtered by a selection of various user-defined inputs (searches, drop-downs selections, etc). When I remove all the filtering, the gallery displays all the database items without issue. I'm confident this is not an issue with my filtering code, as the filtering functionality works just fine in the developer environment. It only fails when published. 

    In addition, I have found that if I play around with the various filtering options in the GUI for the published app (ie: give the app a string to search) that the gallery can indeed display items in the published app. Essentially the flow is the following: (1) at launch of app, search text box empty => no items in gallery, (2) enter a search string in text box => a filtered set of items populate the gallery according to the search results, (3) delete search string in text box => the complete non-filtered set of items populate the gallery.

    I hope this info helps to resolve this issue. 

  • PaulD1 Profile Picture
    2,914 on at

    >>(1) at launch of app, search text box empty => no items in gallery, (2) enter a search string in text box => a filtered set of items populate the gallery according to the search results, (3) delete search string in text box => the complete non-filtered set of items populate the gallery.

     

    Could it be that the content of the text box is different between states (1) and (3) - e.g. in one case it may be blank and in another it is an empty string? I seem to recall the Experimental Setting 'Formula Level Error Management' may change the whether power apps considers Blank() == "".

    Try putting labels on your screen and testing whether the TextBox is Blank() or "" in those different states and maybe modify your filter to take either into account.

  • mike_a Profile Picture
    51 on at

    Many thanks Paul -

     

    that was exactly the issue. My textboxes had a default empty/blank value. When changing the default value to "", the powerapp operated in the desired manner. Now upon launch of the app, the gallery is populated. Many thanks! (I hijacked Ken's thread, so I'm not sure if this can be deemed as "solved").

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 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard