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 / Button's display mode
Power Apps
Answered

Button's display mode

(0) ShareShare
ReportReport
Posted on by 945

Hi guys,

 

For button's display mode, why we cannot determine its display mode by some condition ?

I put something like this :

if (CurrentRecord.Posted = true, DisplayMode.Disabled, DisplayMode.Edit)

The "CurrentRecord" is my variable table (record) which the field "Posted" is Yes/No (true/false), I want to disable that button if my data identified as Posted = Yes.

 

Currently there is an error saying like this :

Axal_0-1630315155218.png

Thanks

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Is that button in a gallery?

     

    If yes, try this:

     

    If (ThisItem.Posted = true, DisplayMode.Disabled, DisplayMode.Edit)

     

    Is it after you select an item in a gallery?

     

    If yes, try this:

     

    If (Gallery1.Selected.Posted = true, DisplayMode.Disabled, DisplayMode.Edit)

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

     

  • Axal Profile Picture
    945 on at

    Hi @Nogueira1306 

     

    No, the button is inside container only.

    There is another popup error message saying: Invocation of unknown or unsupported function.

     

    Thanks

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    How do you define the var "CurrentRecord")

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

  • Axal Profile Picture
    945 on at

    Hi @Nogueira1306 

     

    Actually it is a result from a lookup from ModelDrivenFormIntegration, like this :

    Set(CurrentRecord, LookUp(MySourceTable, 'Journal ID' = [@ModelDrivenFormIntegration].Item.'Journal ID'));

     

    But upon checking of this variable, I found something weird though, it looks like the field has no value ->

    Axal_0-1630317006921.png

    While if I checked in its raw data, my table's "Posted" field currently has value "No" to all, and it is a data type Choice "Yes/No"

     

    Thanks,

  • timl Profile Picture
    37,306 Super User 2026 Season 2 on at

    @Axal 

    Can you confirm that you spelled If with a capital I? In your initial post, your If statement is spelled with a lowercase i.

    If you spell it with a lowercase i, it would cause the "Invocation of unknown or unsupported function" error.

     

    timl_0-1630317134377.png

     

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    https://www.youtube.com/watch?v=pn50AKn3Q1Y 

     

    We need to find  out why it is not returning Yes/No

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

  • timl Profile Picture
    37,306 Super User 2026 Season 2 on at

    Hi @Axal 

    The missing posted value will most likely be due to explicit column selection, the same reason as what we discussed here a few weeks ago...

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Does-Lookup-function-return-all-fields/m-p/1216164

     

  • Axal Profile Picture
    945 on at

    Hi @timl ,

     

    IMO actually this explicit column and the part whereby we need to explicitly mentioned the column is quite troublesome, when we create our own column, basically we want to use it. Understand about "performance issue", but it is not solving the issue it self when they just don't call the field, just like you have have kids and he's noisy then just leave him behind ?

     

    My columns is less then 10 anyway, so I've decided to switch off that feature. I think it is getting ridiculous if we need to type our own columns as where is the "LOW CODE NO CODE" in here ? it's just marketing gimmick.

     

    However, it seems it doesn't solve the issue, hence now my expected field not even in the list. Probably should wait a couple of hours to refresh, ... it's cloud.....

     

    Pardon my frustration...😫

     

  • Verified answer
    Axal Profile Picture
    945 on at

    Hi all,

     

    Solved by switch off the "Explicit column selected" 

     

    Thanks

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard