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 strange s...
Power Apps
Answered

If Statement strange syntax

(0) ShareShare
ReportReport
Posted on by 257

Hi Guys.

Very simple question.

Why does this work? (image bellow)

 

1.1.PNG

And this doesnt? (image bellow)

1.2.PNG

 

Is there any error on the syntax or Its just not acceptable?

 

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @JoaoSantos489 
    Leave out the "," after "22" and  change the "And" to "OR" to find numbers Less than 22 or greater than 25, Your statement is illogical as a number cannot be less than 22 AND greater than 25.

  • JoaoSantos489 Profile Picture
    257 on at

    Thanks it Works!

    I leave here the correct syntax:

     

    If(Value(Total_Dias.Text) <22 Or Value(Total_Dias.Text) >25;
    Notify("Error";NotificationType.Error;4000);
    Notify( "Sucess"; NotificationType.Success; 4000 ))

     

    PS: It as to be "Or" not "OR" 

     

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard