cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sas_23
Regular Visitor

Block Permission for an employee if an item created already in Power Apps.

We have an App called Leave Request Application. Where Employees will get in and apply for leave, In this we have a section called Mandatory Leave (Mandatory leave is in Dropdown )where an employee can use this only once a year. all the data submitted in the Leave Request Application will be stored in a Sharepoint list called "Leave Request Form".For ex, If an Employee apply an Mandatory Leave on 22/9/2022, next time when he try to apply Mandatory Leave it should not work because for an employee he can apply Mandatory leave only once a year. How can we Achieve this.

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @sas_23 ,

 

This is achievable but the method will based upon of your need. If you want to hide the Yes selection from the dropdown, you can modify the Items of the dropdown:

If(
   IsBlank(LookUp('Leave Request Form', Employee.DisplayName = User().FullName && 'Are you applying for mandatory leave' = "Yes") && Year('Leave Date')= Year(Today()))),
   ["Yes","No"],
   ["No"]
)

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @sas_23 ,

 

This is achievable but the method will based upon of your need. If you want to hide the Yes selection from the dropdown, you can modify the Items of the dropdown:

If(
   IsBlank(LookUp('Leave Request Form', Employee.DisplayName = User().FullName && 'Are you applying for mandatory leave' = "Yes") && Year('Leave Date')= Year(Today()))),
   ["Yes","No"],
   ["No"]
)

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,434)