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 / Inconsistent behavior ...
Power Apps
Answered

Inconsistent behavior between Edit and Play

(0) ShareShare
ReportReport
Posted on by 41

I have a very simple If statement for the DisplayMode of a button:

 

 

If(IsBlank(gblCurrentShipment.documentation), 
DisplayMode.Disabled, 
DisplayMode.Edit)

 

 

 It works as intended when I am using the application in Edit mode.

However, when I Play the application, gblCurrentShipment.documentation is always blank. This variable is set on the previous screen as follows:

Set(
 gblCurrentShipment,
 LookUp(
 '[dbo].[shipment]',
 id = galShipmentHS.Selected.id
 )
);


Why am I getting different behavior between Play and Edit using the same versions?

This functionality was working fine for weeks previously and nothing was changed on either the app end or the data source end.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,378 Most Valuable Professional on at

    Hi @jblane ,

    There appears nothing wrong with your logic - and the issue (obviously) is why the lookup is not producing data Put a label on the screen with

    galShipmentHS.Selected.id

    and see if you have an id. Then try

    galShipmentHS.Selected documentation

    if this field is not already in the gallery data set, include it ( you can also set it off this if present rather then using the lookup).

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • jblane Profile Picture
    41 on at

    @WarrenBelz 
    Thanks for the reply. I did try some of the debugging steps you've mentioned and it seems that everything in the object other than its .documentation property is being pulled back from SQL, so I'm really at a loss as to why it pulls back fine in Edit but not in Play.

  • WarrenBelz Profile Picture
    156,378 Most Valuable Professional on at

    @jblane ,

    Maybe grasping at straws here, but what type of field is Documentation?

  • Verified answer
    PaulD1 Profile Picture
    2,914 on at

    If you are getting blank fields in PowerApps (whereas there is data in the datasource) please try turning off 'Explicit Column Selection' in the Advanced settings.

    'Explicit Column Selection' guesses which columns your App needs but (in my experience) it doesn't do a very good job. When you are working in the Studio, you may have performed an action that triggers Power Apps to realise that you need that column, but when you run in Play mode, that action has not triggered and so Power Apps does not fetch the column.

    In general, I would leave Explicit Column Selection off if you are using SQL as you are probably connecting to normalised tables or views that don't contain many extraneous columns.

    'Explicit Column Selection' comes in handy when you are using CDS with standard entities that have a crazy number of fields (something like 180 for Account) and restricting the returned data to only the columns you actually want can yield a significant boost in performance.

  • Verified answer
    jblane Profile Picture
    41 on at

    This seems to have done the trick, wasn't even aware of this setting. Thank you!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard