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 / Using UpdateIF for add...
Power Apps
Unanswered

Using UpdateIF for adding attachments to a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 878

So i have two screens on my App, one for new items and one for editing the created items. The new form is perfect 😄 It even adds in attachments with this code on the OnSelect of a button: 

atch(
 Incidencias;
 Defaults(Incidencias);
 { 
 Incidencia:{Value:DataCardValue1.Selected.Value};
 'Departamento encargado':{Value:DataCardValue3.Selected.Value};
 Cliente:ComboBox1.Selected.Cliente; 
 Producto:ComboBox2.Selected.Producto;
 'Número Documento':DataCardValue14.Text;
 'Personal encargado':DataCardValue4.SelectedItems;
 Estado:{Value:DataCardValue2.Selected.Value};
 'Propuesta resolución':DataCardValue10.SelectedDate;
 'Fecha de resolución':DataCardValue7.SelectedDate;
 'Registro incidencia':DataCardValue5.SelectedDate
 };
 SharePointForm1.Updates
);;
RequestHide()

 

I want to replicate this behaviour for the Edit screen, I have it working like this:

 

UpdateIf(
 Incidencias;
 ID = SharePointIntegration.SelectedListItemID;
 { 
 Incidencia:{Value:DataCardValue1_1.Selected.Value};
 'Departamento encargado':{Value:DataCardValue3_1.Selected.Value};
 Cliente:ComboBox1_1.Selected.Cliente; 
 Producto:ComboBox2_1.Selected.Producto;
 'Número Documento':DataCardValue14_1.Text;
 'Personal encargado':DataCardValue4_1.SelectedItems;
 Estado:{Value:DataCardValue2_1.Selected.Value};
 'Propuesta resolución':DataCardValue10_1.SelectedDate;
 'Fecha de resolución':DataCardValue7_1.SelectedDate;
 'Registro incidencia':DataCardValue5_1.SelectedDate
 }
 );;
RequestHide()

Of course, it doesn't add any attachments, but it does update all fields that were changed. What would I need to change in order to add the necessary attachments?

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,927 Most Valuable Professional on at

    Hi @WorkingRicardo ,

    Attachments will only save with Patch(FormName.Updates) or SubmitForm()

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard