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 / expected Enum Value. I...
Power Apps
Answered

expected Enum Value. If popup variable = true, set variable to view, otherwise leave variable alone.

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

where am I going wrong here? GEtting expected Enum error here on DefaultMode of my editform1 -

 

If(conclu=true, Set(varFormMode, FormMode.View), varFormMode)

 

conclu is a popup, when its visible i want to make the rest of the form..not clickable i guess.

when its closed i want it to be varFormMode.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @wonka1234 ,

     

    The DefaultMode is a declarative property and the Set function is a behavioural function. Using the two combined is causing the issue.

     

    Try setting the formula to:

    If(conclu, FormMode.View, varFormMode)

     

    You may notice I removed a part in the condition since it is redundant: conclu will already return a boolean. It's like saying: "If it's true, then it's true", instead of: "It's true".

  • AdilAhmed4441 Profile Picture
    2 on at

    Getting this error expected Enum Value in this syntax DisplayMode = If(IsBlank(LookUp(MESC, ID = ThisRecord.ID)),DisplayMode.Edit,DisplayMode.View) 

     

    How can I resolve it ?

  • BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @AdilAhmed4441 ,

     

    From a syntax perspective this all looks correct. Can you please share a screenshot of the situation where you get this error to see if that yields any further clues?

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard