I have a SharePoint list that I use as a audit table. It captures all creations, updates, deletions, etc. It is not dependent on any IDs or lookups. When an action occurs it just captures title, date, person, action.
In my PowerApp I have a gallery that lists all of the tasks assigned to the person using the app. There are two buttons in the gallery a detail and delete. The detail button opens up a form on the same screen with the details of the task and a editable status drop down and save button. The other fields are read only including task title. I want to pull the task title from the form into my patch so it automatically displays the task title, so we know what task was deleted.
The details button in the gallery is : Set(varTaskRecord,ThisItem)
The trash button in the gallery is: RemoveIf(PMSolution,ID=varTaskRecord.ID And varTaskRecord.'Task Assigned'.DisplayName = User().FullName);Patch(PM_Audit, Defaults(PM_Audit),{'Type of Action':{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:6,
Value:"Task Deleted"},Title:"Need to make dynamic to display task title from varTaskRecord",Comments:"Decision by and Requested by is the person who deleted the task.",'Decision ':"Task Deleted",
'Decision By':{
Claims: Concatenate(
"i:0#.f|membership|",
User().Email
),
Department: "",
DisplayName: User().FullName,
Email: varUserEmail,
JobTitle: "",
Picture: ""},
'Decision Date':Today(),'Date Created':Today(),
'Requested By':{
Claims: Concatenate(
"i:0#.f|membership|",
User().Email
),
Department: "",
DisplayName: User().FullName,
Email: varUserEmail,
JobTitle: "",
Picture: ""}})