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 / Disable button based o...
Power Apps
Answered

Disable button based on dataverse choice field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a multi screen PowerApp that leverages a collection to collate the information entered. That colllection has one record that is displayed on the final page and the patched into the database. colNewJD is the variable that is passed between each page and patched to ensure that it has the users changes/updates.

 

I want to be able to disable the button if the record being viewed is being processed. The following code is being put in the button's DisplayMode field. I cannot access ThisItem.'Flow State' because it is in a Form, and the button is on the outside of the form.

 

If(First(colNewJD).'Flow State'='Flow State (Job Description Verifications)'.Processing,
FormMode.View,
FormMode.Edit
)

 

Problem: I am pretty sure my logical test is comparing different types, but I can't figure out what needs to change. The error message is "Expected enum value"

Categories:
  • Verified answer
    zachm Profile Picture
    Microsoft Employee on at

    Welp. I was very close. I used the wrong Mode. i needed DisplayMode not FormMode.

     

    If(First(colNewJD).'Flow State'='Flow State (Job Description Verifications)'.Processing,
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard