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 / How to write a simple ...
Power Apps
Answered

How to write a simple if function

(0) ShareShare
ReportReport
Posted on by 101

As a Power BI user learning to use Power Apps, I am struggling quite hard with the syntax of writing functions.

I am trying to write an IF function using Display Mode to disable a text box based on the user's response.

I have a radio selection with 3 choices, 3rd party, customer, and own company.
The next entry party is name and address. If own company is selected, we do not need this information. Therefore, what is the exact syntax to write this? I would guess it would be this...but it's not working.

If(Responsible Party = "own company"),DisplayMode.Disabled, DisplayMode.Edit)

Clearly this is not right. Help would be appreciated as this transition has been pretty difficult. Thanks!

Categories:
I have the same question (0)
  • Verified answer
    eka24 Profile Picture
    20,923 on at

    Try this:

    If(RadioName.Selected.Value = "own company",DisplayMode.Disabled, DisplayMode.Edit)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • water-guy-5 Profile Picture
    101 on at

    @eka24 should my property be "DisplayMode"?

  • eka24 Profile Picture
    20,923 on at

    Place the formula on the DisplayMode property of the Textbox

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @water-guy-5 

    Isn't this the same one as yesterday?  Except it was on the Visible property?

  • water-guy-5 Profile Picture
    101 on at

    Yes, however yesterday was based on if a text box was empty or contained text. Today, I am trying to perform a similar end result based on what is selected between 3 responses within a radio. Syntax is different, and I am struggling a bit.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @water-guy-5 

    Gotcha!  Then what @eka24 mentions is good for what you need.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard