Hello,
I am pretty new to powerapps and i am stuck on a requirement that seems pretty straightforward.
I have a sharepoint list that is populated by collected survey details. On my reviewer powerapp end, i get to fetch each survey detail for further analysis and classification.
All this analysis and classification is done on the edit form section. My problem is, i don't want to replace the original survey details on my sharepoint list A with these edits and classification, but would like these changes to be created as a new item (something like a child item with reference to original survey item) on a new sharepoint list so as not to lose the original submitted survey details. This is because the end users powerapp should only be able to see the edited and classified survey details. I tried creating a new sharepoint list with exact fields like the original sharepoint list, with an extra ID field (ParentID) that is similar to the original survey record ID. This list is to be populated every time the SubmitForm button is clicked on the edit form using Patch function. This worked well, but unfortunately i got stuck on records that have attachments. I can't seem to be able to populate my attachment field on my second list using the patch function in case a reviewer decides to add another attachment to a survey. Kindly advice on what to do. And if there is any other easier way of doing this than what i am currently trying to do. I can't seem to wrap my head around the parent-child relationship situation which i suspect is the right way to implement this.
Currently this is what i have on my onSelect property on my Submit button on the EditForm. 'ACRPE Topic Message Details' is the name of my second sharepoint list.
SubmitForm(EditForm1);
Refresh('ACRPE Topic Message Details');
Patch(
'ACRPE Topic Message Details',
Defaults('ACRPE Topic Message Details'),
{
ParentID: BrowseGallery2.Selected.ID,
'Message Reviewed By': BrowseGallery2.Selected.'First Reviewer',
Topic: BrowseGallery2.Selected.Topic,
'Message Classification': BrowseGallery2.Selected.'Message Classification'.Value,
'Enriched Message': BrowseGallery2.Selected.'Enriched Message',
Attachments: BrowseGallery2.Selected.Attachments
}
);

Report
All responses (
Answers (