web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button Enabled / Disab...
Power Apps
Answered

Button Enabled / Disabled bug?

(0) ShareShare
ReportReport
Posted on by 87

Hello everyone,

 

I am currently testing my application on my mobile phone and on the browser.

 

When I am testing the App in Power-Apps "editing-mode" the buttons work like they should:

Bildschirmfoto 2023-07-31 um 18.35.28.png

the "kommen" button is enabled to start the timer.

the "X" button is disabled until you press the "kommen" button. After that the "kommen" button is disabled.

the "gehen" button is also disabled until you press the "kommen" button. After that the "kommen" button is disabled.

 

 

But if I use the App via the link for the browser or on my mobile phone it looks like this:

 

Bildschirmfoto 2023-07-31 um 18.35.40.png

all buttons are enabled but from the start there should only be the "kommen" button enabled.

 

I am working with this code for the "kommen" button:

If(varNewItem.'Active Session'=true;DisplayMode.Disabled;DisplayMode.Edit)

 

"X" and "gehen" button share the same code:

 

If(varNewItem.'Active Session'=false;DisplayMode.Disabled;DisplayMode.Edit)

 

once i click on the "kommen" button I activate an active session on my sharepoint list.

 

any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    Is varNewItem.'Active Session' defined at the start of the app?

    If not, you'll want varNewItem.'ActiveSession' to be defined as false, likely either in the app's OnStart or the form's onvisible.

     

    If a record is blank when being compared as a boolean in an if function, it will return false - so if it's blank, both of your if statements would return false at the same time.

     

    Hope this helps!

  • apca Profile Picture
    87 on at

    thanks a lot now its working as it. should be! 

     

    Set(varNewItem, { ActiveSession: false })

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard