cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vinith
Level: Powered On

Powerapps to check against sharepoint for startdate and enddate

Hi , Could you help me to resolve .

 

i am creating an app for for the technicians(Each technician has an unique ID), Users will book for technicians and technician will be alloted for that work  with start and end date booked.

now when an new user try to book for same technician(ID) then he should not be allowed to book for same startdate and enddate as he is already occupied with work. so here i have to compare with sharepoint for that Id weather he is already booked for that time period based on startdate and enddate.

In App i have startdate and enddate and data is getting saved in sharepoint with startdate and enddate.

 

Could you please help me for this, i have tried multiple codes but unable to find correct solution.

i have tried below code but its not correct

Filter(
'Listname',
startDateColumn >= startDatePicker1.SelectedDate && endDateColumn <= endDatePicker2.SelectedDate /* <-- DateColumn is a Date Time type column in sharepoint list. DatePicker1 represents the Start Time, DatePicker2 represents the End Time */
)

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Powerapps to check against sharepoint for startdate and enddate

Hi @Vinith ,

 

Your formula is working because that the column's column type is Date and Time, but datepicker control only have date value.

 

Please try with below formula instead:

Filter(ListTest,Date(Year(DateTime), Month(DateTime), Day(DateTime)) >= DatePicker1.SelectedDate && Date(Year(DateTime), Month(DateTime), Day(DateTime)) <= DatePicker2.SelectedDate)

ListTest is my SharePoint list name.

DateTime is my date and time column's name.

 

This formula will result all the records that have DateTime column value in the date range. 

Capture.JPG

 

Regards,

Mona

Community Support Team _ Mona Li
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

5 REPLIES 5
Vinith
Level: Powered On

Re: Powerapps to check against sharepoint for startdate and enddate

So the User should be able to allow to book other dates which are not booked(has to compare with backend sharepoint with start and end date)

Vinith
Level: Powered On

Re: Powerapps to check against sharepoint for startdate and enddate

Hi All,

 

Any inputs provided will be really helpful,, i have tried alot but no result.

 

 

Community Support Team
Community Support Team

Re: Powerapps to check against sharepoint for startdate and enddate

Hi @Vinith ,

 

Your formula is working because that the column's column type is Date and Time, but datepicker control only have date value.

 

Please try with below formula instead:

Filter(ListTest,Date(Year(DateTime), Month(DateTime), Day(DateTime)) >= DatePicker1.SelectedDate && Date(Year(DateTime), Month(DateTime), Day(DateTime)) <= DatePicker2.SelectedDate)

ListTest is my SharePoint list name.

DateTime is my date and time column's name.

 

This formula will result all the records that have DateTime column value in the date range. 

Capture.JPG

 

Regards,

Mona

Community Support Team _ Mona Li
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

Vinith
Level: Powered On

Re: Powerapps to check against sharepoint for startdate and enddate

@v-monli-msft 

 

Hi Mona,

 

Thanks for the solution but i dont need to take in gallery.

 

I want to just highlight an error if the startdate and enddate are already selected or exits in backend sharepoint againt same ID.

 

Main concept is User should be stopped from selecting same date , As they might be blocked against another work.

In my backend database i have already Start_date, end_date with date.

 

In frontend too i have Startdate, enddate , when i select startdate and enddate , It has to search against sharepoint whether the selected dates are already booked for that particalar ID:

 

if while selecting date and time is not possible then we can take an button and write code on it aswell to populate error if the selected dates are already exists in sharepoint

 

Thanks in Advance ,


@v-monli-msft wrote:

Hi @Vinith ,

 

Your formula is working because that the column's column type is Date and Time, but datepicker control only have date value.

 

Please try with below formula instead:

Filter(ListTest,Date(Year(DateTime), Month(DateTime), Day(DateTime)) >= DatePicker1.SelectedDate && Date(Year(DateTime), Month(DateTime), Day(DateTime)) <= DatePicker2.SelectedDate)

ListTest is my SharePoint list name.

DateTime is my date and time column's name.

 

This formula will result all the records that have DateTime column value in the date range. 

Capture.JPG

 

Regards,

Mona


 

Note: I have many UserID each ID has their own specific startdate and enddate.

 


"

 

 

 

Vinith
Level: Powered On

Re: Powerapps to check against sharepoint for startdate and enddate

Note: I dont need time , I just need Date to be searched against sharepoint and populate error if they overlap with already existing selected dates

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,246)