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 Automate / Month value should be ...
Power Automate
Unanswered

Month value should be less than or equal to 12 and greater than or equal to 1

(0) ShareShare
ReportReport
Posted on by 5

Hi,

  I have written a if condition where I am checking the output of compose to be less than or equal to 12 and greater than or equal to 1. I am writing this to validate the month field, However if I am giving the output value(input month) as -100 it is not giving warning message and validating successfully.  Can someone please help with this.

 

ShivaniR251_0-1697266735215.png

 

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @ShivaniR251 

     

    I would suggest converting data type of both the operands to be same. The condition will be executed correctly if both operands are compatible. So, convert both operands to integer using an expression as shown below:

    ManishSolanki_0-1697269895154.png

    Expression needs to be entered in the expression window as highlighted in the above screenshot.

    Expression for left side operand:

    int(outputs('Compose'))

    Expression for right side operand:

    int('1')

     

    Similarly, for second clause use expressions to compare:

    Expression for left side operand for second clause:

    int(outputs('Compose'))

    Expression for left side operand for second clause:

    int('12')

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • ShivaniR251 Profile Picture
    5 on at

    Thanks @ManishSolanki , It worked.

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 Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 459

#3
11manish Profile Picture

11manish 382

Last 30 days Overall leaderboard