Hi there! I'm looking for help patching multiple values into the same Title column in a SharePoint list that corresponds with a specific date in a date column.
Background: SharePoint list is very simple, with only Variety (Title), Goal, and WeekEndDate. Each week, someone will set new goals for the same varieties, and I'd like to keep a historical record of those goals. For example, Lemons during the week of 2/05/2022 is 280,000, and then the next week of 2/12/2022 is 290,000, as you can see in the below image. I've got this data connected to a Power BI file that pulls in actual results from our ERP to compare.
Current set-up: I have a very simple Power Apps interface that allows someone to input the goal through a text input field for each variety, select a week end date from a date picker, then submit those goals to the SharePoint list. The input uses a gallery with text input fields (below image), though I can change this to a form our text input outside of a gallery if needed. But this process so far works perfectly fine, and is what I used to get the SharePoint values in the above image.
Ideal solution: I'd like for the submission process to first check the WeekEndDate against the selected date in the date picker to see if any entries have already been made for that week. If not, submit new records. If so, a pop up window should ask if they want to overwrite. If so, patch the data to the existing records where the Variety and WeekEndDate match. I know how to manage the pop up window and all of that, I'm just completely stuck on how to write the code to check the WeekEndDate column for existing records, and then write over those records if they exist.
Any help would be very appreciated!

Report
All responses (
Answers (