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

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,505 Super User 2025 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,505 Super User 2025 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard