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 / If statement Not equal to
Power Apps
Unanswered

If statement Not equal to

(0) ShareShare
ReportReport
Posted on by

I am trying to write an If statement like "If(IsBlank(field)" but I need it to be "If not = to "Select...""(field)"  How can you write something like that?  I want the action to run as long as the field value is not "Select..."

Categories:
I have the same question (0)
  • seadude Profile Picture
    1,855 on at

    Hm.

     

    Its tough for me to understand exactly what you are looking for here. But I'll try:

    It sounds like you have a Textbox with "Select x" in it and you want to say,

    If textbox.text has the string "Select x" in it, do something. 

    If thats the case try:

    If(
     IsMatch(textBox.Text, "Select x"),
     doSomethingCool,
     beLame
    )

    I tested this. It works. Here are the docs. When in doubt, consult Mr. Dang (a true treasure to the PowerApps community)!

  • PowerAid Profile Picture
    on at
    IsMatch(textBox.Text, "Select x"), doSomethingCool, beLame )

    I tested this. It works. Here are the docs. When in doubt, consult Mr. Dang (a true treasure to the PowerApps community)!


    Ok.  I am actually wanting a Patch to NOT run if the value of the dropdown = "Select..."  .  Is there an opposite of IsMatch?

     

    This is part of a repeating table that I have designed.  The Patch will write values to my SharePoint list ('Revenue Pre-Defined Categories').  One of the fields in my repeating table is a dropdown and I dont want it to write to SharePoint if that dropbown has not been set to something other than Select.

     

    ForAll(RevenuePreDefinedCollection, Patch('Revenue Pre-Defined Categories', Defaults('Revenue Pre-Defined Categories'), {Title: CategoryCC, AmountEach: AmountEachCC, Quantity: QuantityCC, Subtotal: SubtotalCC, MasterID: Form1.LastSubmit.ID}))


    @seadude wrote:

    Hm.

     

    Its tough for me to understand exactly what you are looking for here. But I'll try:

    It sounds like you have a Textbox with "Select x" in it and you want to say,

    If textbox.text has the string "Select x" in it, do something. 

    If thats the case try:

    If(
                          
  • Verified answer
    seadude Profile Picture
    1,855 on at
    Aha. You can usually put a “!” in front of your statement to make it a “NOT”.

    Another option may be:
    - Set the Submit Button DisplayMode Property to:

    If(
    Dropdown.Selected.Value = “Select”,
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

    This is a type of manual error handling you can use for different things.
    Coupled with some And() / Or() functions make it quite powerful.
  • NickSoan Profile Picture
    16 on at

    The Microsoft DAX language for the PowerPlatform tools doen't have the operator !=, but it does have <>

    If( DropDown.Selected.Value <> "View", 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

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