Showing results for 
Search instead for 
Did you mean: 
Resolver I
Resolver I

Help creating a Filter and Patch combo function



I am trying to create a function that will update a column in a SharePoint list on a button press. The user would enter in a starting date (date picker) and time (made using several combo boxes), and an ending date and time as well as text that would be placed into the SharePoint column. The filter should narrow down any list entries within the start and end date/time and then patch the text into the column for those entries. Anyone know how I could accomplish this?


Resolver I
Resolver I



I am a little unsure of whether the SWITCH function is allowed inside UPDATEIF.  Perhaps you can give this code a test inside the OnSelect property of the button.  Make sure to change all of the control names to match your own.


    ('Starting Date and Time' 
         >= Date(DatePicker_Start.SelectedDate)
         + Time(dropDown_startHour, dropDown_startMin)
         + Time(Switch(dropDown_AMPM, "AM", 0, "PM", 12),0,0))
    ('Ending Date and Time'
         <= Date(DatePicker_End.SelectedDate)
         + Time(dropDown_endHour, dropDown_endMin)
         + Time(Switch(dropDown_AMPM, "AM", 0, "PM", 12),0,0)),

    {yourColumn1: textInput_eventLabel.Text}


Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thanks for looking into this. I'm curious if you can explain to me the reasoning behind choosing UpdateIf over a Filter and Patch. I'm still pretty new to PowerApps, so maybe there is something I don't know. But I thought we had to use Filter and Patch for lists over 2,000 entries, so that the function gets delegated to SharePoint rather than PowerApps not being able to handle processing over 2,000 entries.


I'm very glad to see you are thinking about delgation here and I believe you raise a very good point!  I chose to ignore delegation since you had not listed it as a concern.


UpdateIf is only a good option if you have 2,000 records or less since it cannot be delegated.  Likewise, the Filter function cannot be delegated when using Dates in the criteria.  Its quite a big omission to SharePoint delegation abilities in my opinion.  Rumor is there are plans to change that in the future.


I've been meaning to do some experiments on how to overcome this issue but just haven't found the time yet...  I believe it could be done by storing dates as a Number data type like this post suggests but that seems like alot of work.  (Link:


Link To SharePoint Delegation Summary:


Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

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 (5,049)