In the picture I have my PowerApps form on the left that will make changes to the SharePoint list on the right. The scribbled out text in my app is User().FullName which is currently matching the name in my SharePoint list.
For my Submit button I am using the following code to create a new record in the SharePoint if the name doesn't exist and make changes to a current record if it already exist.
If (
LookUp(
'SharePoint_List',
Name = UserNameLabel.Text,
Name
) = Blank(),
SubmitForm(PowerApps_Form),
Patch(
'SharePoint_List',
LookUp(
'SharePoint_List',
Name = UserNameLabel.Text
),
{
'This is a long list': Item1Toggle.Value,
'This is an even longer list': Item2Toggle.Value,
'Item 3': Item3Toggle.Value,
'Item 4': Item4Toggle.Value,
'Item 5': Item5Toggle.Value
}
)
)
However, I am having issues figuring out how to automatically change the toggle values in my app to match those of the SharePoint if the user name matches. Currently in my picture both of the user names are the same, so the toggles in my app should all be "Completed" since all 5 values are checked in my SharePoint. Thanks in advance!