cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LFusGo
Helper I
Helper I

Add attachment to SP List entry

Hi all

 

Currently I use the Patch function with the Form.Updates but it's not working correctly. Somehow some Infos of the SP List entry just disappears when I patch with the Form.Updates. Without it's working correctly I just can't add an Attachment.

 

The entries that disappear are: Barcode, Category, Status, 

LFusGo_0-1669821659287.png

On the OnSelect properties on the Save button in the top right corner this code is attached:

 

Patch(
    Assets,
    Gallery1.Selected,
    {
        Barcode: Label2_2.Text,
        Title: TextInput1_1.Text,
        Category: {
            '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Value: Dropdown1_1.Selected.Value
        },
        Maintain: DataCardValue1_4.SelectedDate,
        Location: {
            '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Value: Dropdown3_1.Selected.Value
        },
        Borrower: Blank(),
        Time: Blank(),
        Comment: Blank(),
        Status: {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
            Id: 1,
            Value: "Available"
        }
    },
    EditForm1_2.Updates;
    
);
Navigate(ConfirmScreenAdmin);
UpdateContext({ShowPopupReset: false})

 

 

Thanks for any help!

 

Best

Lukas

1 ACCEPTED SOLUTION

Accepted Solutions
WiZey
Super User
Super User

Hello @LFusGo ,

 

That's because the "Updates" of your form only save the fields you're actually editing, whereas the other fields like "Category" and "Status" are filled in elsewhere.

 

Try switching the values in "Patch()" and it should be better:

 

Patch(
  source,
  Gallery.Selected,
  Form.Updates,
  {...}
)

 

View solution in original post

1 REPLY 1
WiZey
Super User
Super User

Hello @LFusGo ,

 

That's because the "Updates" of your form only save the fields you're actually editing, whereas the other fields like "Category" and "Status" are filled in elsewhere.

 

Try switching the values in "Patch()" and it should be better:

 

Patch(
  source,
  Gallery.Selected,
  Form.Updates,
  {...}
)

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,492)