cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yoursnani
Post Patron
Post Patron

Submitting data is new ( not duplicate)

Hi 

I am creating a form that hold employee details . we have text columns,people columns,and date columns 

My scenario is 

When user save data people columns is submitting person columns . when user first time submit form it should save, if user submit with same name in people columns ,form not to submit ? 

 

how can we achieve this ? 

1 REPLY 1
Abhilash_Swain
Super User
Super User

@Yoursnani ,
 One way of restricting -> If this is a share point list declare the column as Unique and required. It will not save the record.

Abhilash_Swain_0-1641292154147.png

 

OR
You can get the current employee names into a collection on APP Start. validate the textbox if the employee exist

 

I have used this in a Label control - Text.

If (!IsBlank(First(Filter(Employee_Office,Ename.Email = User().Email)).Ename.DisplayName ),"User Exist","")

Employee_Office:- is my SharePoint list and Ename is a people picker
So whenever there is a user of the same email id appears, It displays user exist. You can disable buttons to save the forms .

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,380)