cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GabrielGondin
Frequent Visitor

The type of this argument X does not match the expected Type Attachments. Found type Table

Hello everyone,
I am trying to send a collection to the SharePoint list using For All and Patch , however I have an error when trying to send column with attachment , could you help me, is there any possibility to do this ?

ForAll(
    Colarq,
    Patch(
        'Solicitação de Arquivamento',
        Defaults('Solicitação de Arquivamento'),
        {
            'Laudo/logbook': {Value: Laudooulogbook},
            'Etiqueta de Caixa': Etiqueta,
            Setor: {Value: Setor},
            Ano: Ano,
            CDC: CDC,
            Número: Número,
            Attachments:Anexo
        }
    )
);

printttttt.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

Attachments can't be patched using the patch function, you would need to have a separate form that Submits the attachment, then Patch the last item submitted by that with all of your other values.

 

Submit(AttachmentForm);

then

AttachmentForm.OnSuccess:

Patch(
   datasourcename,
   AttachmentForm.LastSubmit,
   {
   DataExample: DataExample,
   DataExample2: DataExample2
   }
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

1 REPLY 1
iAm_ManCat
Super User
Super User

Attachments can't be patched using the patch function, you would need to have a separate form that Submits the attachment, then Patch the last item submitted by that with all of your other values.

 

Submit(AttachmentForm);

then

AttachmentForm.OnSuccess:

Patch(
   datasourcename,
   AttachmentForm.LastSubmit,
   {
   DataExample: DataExample,
   DataExample2: DataExample2
   }
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (4,668)