cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShineTan123
Helper IV
Helper IV

Alarm and auto reject if number is more than budget

Hi Community,

I have an app to flow the approval. And there is a step that the requestor to update the actual cost, and then the request will flow to the approvers. Now I want to add the control gate to reject if the actual cost is more than the budget. How should I do?

The actual cost updated screen is based on a table, and there is a field for budget. 

 

ShineTan123_0-1668486427726.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ShineTan123 ,

Assuming those controls are on a Form

If(
   Value(ActualPaidTextBoxName.Text) > ThisItem.Budget,
   DoRejectionHere,
   SendApprovalHere
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

13 REPLIES 13
WarrenBelz
Super User
Super User

Hi @ShineTan123 ,

Assuming those controls are on a Form

If(
   Value(ActualPaidTextBoxName.Text) > ThisItem.Budget,
   DoRejectionHere,
   SendApprovalHere
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Hi @WarrenBelz ,

Yes, this is for a form which is coming from a gallery. But how should I code this together?

 

ShineTan123_0-1668492153433.png

 

Hi @ShineTan123 ,

You really have not given me enough information to start on the process after that. The rejection could be a message (pop-up/visible Label/Notification) - or do you want to populate something. The approval is whatever you are doing now.

Hi @WarrenBelz ,

My apology. 

I want there will be a pop-up error message to notify the requestor the actual cost is more than budegt, and this will also stop the requestor to submit the request. If so, how should I code?

@ShineTan123 ,

Just use Notify() - that is probably the easiest

Notify("More than budget",Error, 5000)

If you want a pop-up, you need to set a Variable to true, then have the Visible of the pop-up as that Variable - you then also need an X on this setting the Variable to false to hide it once viewed).

 

Hi @WarrenBelz ,

This formula is objecting on Form-Item, right? Could you guide me with more details? I am still not familiar with the Apps.

Thanks!

Hi @ShineTan123 ,

I am happy to correct any code you attempt and cannot get right. What have you attempted with the code I posted ?

Hi @WarrenBelz ,

I think I didn't get it right, I put the formula into the Form-Item, it's not working. I think I did it wrongly, how should I correct that?

Form-Item is originally from Gallery.Selected.

ShineTan123_0-1668508953377.png

 

@ShineTan123 ,

That really should be on the same control you submit the form with, but I think you need to take a step back here and understand what the various functions do. I am happy to help with code, but I cannot teach you how to use Power Apps.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,350)