cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imughal
Helper I
Helper I

how to check data exist in sharepoint list

Hi,

I have SharePoint List which has some data with date column and created by.

I have simple form submission app.  before user submit form i want to check that if user has submit form on current date or not.

pls guide how can i check from SharePoint list that logged user has record in sharepoint list on current date.

 

pls guide.

thx

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @imughal ,

Do you want to check if the user has submitted record for current date?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. Please consider set the OnSelect property of the "Submit" button to following:

If(
   !IsBlank(LookUp('Your SP List', 'Created By'.Email = User().Email && Text(DateColumn, DateTimeFormat.ShortDate) = Text(Today(), DateTimeFormat.ShortDate))),
   Notify("You have submitted record today, please do not submit repeatly", NotificationType.Error),
   SubmitForm(EditForm1)
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
eka24
Super User
Super User

Try:

If(CountRows(Filter(DataSource,CreatedBy= User().Email&&DateColumn=DatePicker1.SelectedDate)) > 0,Notity("Already Exist"),SubmitForm(FormName))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

KrishnaV
Super User
Super User

Hi @imughal,

 

I totally agree with @eka24 but just correcting a small syntax and adding an additional condition.
Set onVisible of the screen property as Set(varUser, User()) to avoid delegation error on the below if condition.

 

If(CountRows(Filter(DataSource,'Created By'.Email = varUser.Email&&DateColumn=DatePicker1.SelectedDate || Text(Created,DateTimeFormat.ShortDate) = Text(DatePicker1.SelectedDate,DateTimeFormat.ShortDate))) > 0,Notity("Already Exist"),SubmitForm(FormName))

 

 In the above syntax, I have also added additional conditions with the created date also.

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
v-xida-msft
Community Support
Community Support

Hi @imughal ,

Do you want to check if the user has submitted record for current date?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. Please consider set the OnSelect property of the "Submit" button to following:

If(
   !IsBlank(LookUp('Your SP List', 'Created By'.Email = User().Email && Text(DateColumn, DateTimeFormat.ShortDate) = Text(Today(), DateTimeFormat.ShortDate))),
   Notify("You have submitted record today, please do not submit repeatly", NotificationType.Error),
   SubmitForm(EditForm1)
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,331)