Hi @Rick_black ,
The code would look some thing like the below:
First you save the item for the next week, based on the user and startdate in a variable. Then you check if the variable is empty and if it is, you create a new item in the datasource. If the variable is not empty, item in the datasource is update.
Set(
varNextWeek,
Filter(
SharePoint,
User.Email = User().Email && WeekStartDate = DateAdd(DataCardValue***, 7)
)
);
If(
IsEmpty(varNextWeek),
Patch(SharePoint, Defaults(SharePoint),{
User : User(),
WeekstartDate : DateAdd(DataCardValue***, 7),
"This week's outcome : DataCardValue***,
etc.
}),
Patch(Sharepoint, varNextWeek,{
"This week's outcome : DataCardValue***
})
)
DataCardValue*** refers to the DataCards in you form.