web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch attachements aft...
Power Apps
Unanswered

Patch attachements after record is created

(0) ShareShare
ReportReport
Posted on by

Hello Power Apps Community,

 

I have an auditing app that I have created. There are 18 questions that can be answered Pass, Fail, Failed but remediated, N/A. When selecting either fail options a text box appears for notes and a camera icon to take a photo. I am able to create a image collection and associate the question number to the image. 

 

At the end of the audit, I have a collection of Audit questions that were responded with a failure and this uploads fine into SharePoint. It is however finding a way to upload the pictures as attachments either during the ForAll patch.

 

 

ForAll(
 AuditQuestions As AuditQ,
 If(
 Or(
 AuditQ.QuestVal = "Fail",
 AuditQ.QuestVal = "Fail but resolved immediately"
 ),
 If(
 CountRows(QuestionPics) > 0,
 RemoveIf(
 QuestionPics,
 (Int(AuditQ.QNum) - 1) = Int(QuestionNum)
 );
 );
 
 Collect(
 QuestionPics,
 Filter(
 AuditPics,
 QuestionNum = AuditQ.QNum
 )
 );
 Patch(
 'EHS Audit Findings',
 Defaults('EHS Audit Findings'),
 {
 'Audit Area': AuditArea,
 Auditor: Auditor,
 Question: AuditQ.QNum & ": " & AuditQ.Quest,
 'Auditor Comments': AuditQ.QuestComments,
 'Finding Criticality': {Value: AuditQ.QuCrit},
 'Audit ID': AuditID,
 'Finding Type': {Value: AuditQ.QuestVal},
 'Audit Date': Today()
 }
 );
 Patch(
 'EHS Audit Findings',
 LookUp(
 'EHS Audit Findings',
 And(
 'Audit Date' = Today(),
 'Audit ID' = AuditID,
 Question = AuditQ.QNum & ": " & AuditQ.Quest
 )
 )
 
 )
 )
);

 

Audit Question (AuditQ) collection

tmadding_0-1707934820259.png

 

Audit Pics Collection 

tmadding_1-1707934877322.png

I have a Form with an attachment Data Card that I use QuestionPics (Filtered copy of AuditPics based on the current question item from the ForAll loop) set on the Update Attribute.

Any direction or support would be greatly appreciated!

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard