cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zmm14
Helper III
Helper III

Choice Column with max number for each choices

Hello,

 

Please help. I have created a LeaveRequest with the following columns

Title, LeaveType (choice column Vacation-Sick-Others), HalfDay (number), StartDate (date), EndDate (date), TotalDays (calculated column), Approver (person column), Admin (person column).

 

How set a max number for each of the LeaveType choices? So an employee can't request more than whats established.

Vacation - 22 working days

Sick - 18 days

Other - 5 days

 

And how to add a remaning balance calculation for each of the Leavetypes choices.

 

zmm14_0-1633031509116.png

Thank You.

 

 

2 REPLIES 2
eric-cheng
Solution Sage
Solution Sage

Hi @zmm14 

 

There probably isnt a way to do this in Power Automate as the flow is called after the item has been added.  You could send an email back to the creator as ask them to amend it and ave a status of unapproved.

 

In SharePoint, there is column validation but again, it doesnt allow you to reference another so wont work.

 

There used to be the ability to create event receivers to execute code when an item was being added and block the save.  This was back in on prem days so not sure if this is still available.

 

Lastly, you coukd edit thr view in PowerApps and try implementing the logic from there?  The form will look different though.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Thank you for taking the time to reply, really appreciate it.

Is there any “less” complicated way I can keep records of the vacation balances on share point once the approver has approve an leave?

If it’s possible can you please 🙏  show me a bit how to get it done?

Thank You!

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,393)