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 / if status is reject ho...
Power Apps
Answered

if status is reject how to set amount box empty.

(0) ShareShare
ReportReport
Posted on by 1,994

Hi

 

Can I know how to set the amount to blank only if status is Rejected?  currently there is number in the amount box.

 

thanks

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Put something like this in the Text property of the label:

     

    If(status.value = "Rejected",
     "",
     amount
    )

    This will need the specific names for status and amount, as named in your app & data source

  • bbsin Profile Picture
    1,994 on at

    thx

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @bbsin ,

    If @BCLS776 's solution is helpful to you, please mark his reply as a solution.

    In addition, if your issue is not resolved, please don't hesitate to let us know.

    Best regards,

    Allen

  • bbsin Profile Picture
    1,994 on at

    @BCLS776 

    HI sorry 

     

    do you mean, there's an  error,   

    I want to Amount to be blank. 

     Thanks

    bbsin_0-1625636243379.png

     

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @bbsin ,

    Seems that there is a error on your "Status.Value". You need to edit it to meet the current situation.

    Best regards,

    Allen

  • bbsin Profile Picture
    1,994 on at

    Hi @v-albai-msft 


    The Status is a choice field does it affect?

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Yes, using the reference to status.value will bring up the value of the choice that was selected. I notice you may be using a gallery, in which case you may have to reference it through ThisItem.status.value

     

    The If statement we suggested earlier will read the value and compare it to the string, "Rejected". If they match, it will return "" (an empty string, which displays as a blank entry in a label). Otherwise, your code shows it returning a value of zero.

     

    If your code is going into the Text property of a label, you may wish to rework your Text() function to put it inside the If statement: 

    If(ThisItem.status.value = "Rejected","", Text(ThisItem.InvAmt, "$#,###.00")

  • bbsin Profile Picture
    1,994 on at

    Hi @BCLS776 

     

    Great it works.   Thank you

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard