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 / Value(negative number)...
Power Apps
Answered

Value(negative number) showing greater than zero

(0) ShareShare
ReportReport
Posted on by 202

Hi,

I'm having number field where i was checking the requested tickets are greater than available and showing error as shown below:

 

If(
(DValue_TRequest.Selected.Value = "General" && Value(GTickets.Text) > Value(A_GenTickets.Text)) || (DValue_TRequest.Selected.Value = "VIP" && Value(VIPTickets.Text) > Value(A_VIPTickets.Text)),
"Requested tickets are more than available tickets",
Blank()
)

 

But, when i try to enter -1 in requested where the available is 0, it is not throwing any error ? am i doing any wrong here ?

 

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Sharuk ,

    If DValue_TRequest a combobox control ? Have you select a value for this control before you get this behavior ?

    Sincerily I prefer for combobox:

    First(DValue_TRequest.SelectedItems).Value

     

    Hope it helps !

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Please try:

    The key is that 0 is indeed greater than -1. According to the logic of your formula, no error will be reported.

    So,I suggest you add a judgment condition "check whether the inventory is less than or equal to 0",For example:

     

    If(
       (

         DValue_TRequest.Selected.Value = "General" &&

         (Value(GTickets.Text) > Value(A_GenTickets.Text) || Value(A_GenTickets.Text)<=0 )

       )||

       (

          DValue_TRequest.Selected.Value = "VIP" &&

          (Value(VIPTickets.Text) > Value(A_VIPTickets.Text) || Value(A_VIPTickets.Text)<=0)

        ),

    "Requested tickets are more than available tickets",
    Blank()
    )

     

    Best Regards,

    Bof

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard