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 / Error submit multi for...
Power Apps
Answered

Error submit multi forms liste SharePoint

(0) ShareShare
ReportReport
Posted on by 103

Hello,

 

First of all , i wish you all the best for 2021.


I am currently creating an application with multiple screens connected to the same SharePoint list.
The form being long I cut it in 3 parts

I'm now trying to send the information on the sharepoint but I get an error message.
the application tells me that a certain field is empty even though it hasn't ...

This is my syntax :

 

Patch(
FormSections;
LookUp(
FormSections;
Section = 3
);
{IsCompleted: true}
);;

ClearCollect(
PatchedSP;
Patch(
'Fiches Litiges';
Defaults('Fiches Litiges');;
Form2.Updates;;
Form4.Updates;;
Form5.Updates
)
);;

If(
IsEmpty(Errors('Fiches Litiges'));
Notify(
"Success";
NotificationType.Success
);
//Navigate(EndScreen);
Notify(
First(Errors('Fiches Litiges')).Message;
NotificationType.Error
)
)

c12310cd780968fb897511a023424906

 

Can you please help me ?

 

Thank you in advance

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Imade ,

    This bit here

    Patch(
     'Fiches Litiges';
     Defaults('Fiches Litiges');;
     Form2.Updates;;
     Form4.Updates;;
     Form5.Updates
    )

    is the issue - you are Patching Updates, which would be applied to an existing record, but wrapping it inside at Patch with Defaults(List), which creates a new record. If you just want to update the list with the forms, get rid of that line

    Patch(
     'Fiches Litiges';
     Form2.Updates;;
     Form4.Updates;;
     Form5.Updates
    )

     

    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.

  • Imade Profile Picture
    103 on at

    Hello @WarrenBelz ,

    I would like to submit the informations of the 3 forms to SharePoint. it a new informations
    I have tried to delete the line you have indicated but it still tells me that a certain field is empty when it is not
     image.png

     

    Best Regards,
    Imade

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Imade ,

    Yes, actually I missed that (dangers of free-typing) - you have to identify the record you want to Patch. If you have the ID of the current record (for instance if the record has been selected from a Gallery initially, it would be

    Patch(
     'Fiches Litiges';
     {ID:YourGalleryName.Selected.ID};
     Form2.Updates;;
     Form4.Updates;;
     Form5.Updates
    )

     

    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.

  • Imade Profile Picture
    103 on at

    Thank you @WarrenBelzfor your quick reply.

    Sorry but i'm not realy undersand 😞

     

    I found my gallery . now i have the successfull message but nothing is create in my SharePoint Liste

    I've already tried to put the gallery2 on each forms in the field items

     

    Imade_1-1610459387639.pngImade_2-1610459414900.pngImade_3-1610459469989.png

    Maybe something I'm doing wrong

     

    Sorry

    Best Regards,
    Imade

     

     

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Imade ,

    This is not about the gallery, it is about getting the ID of the records in the three forms, which normally would be in the data of the gallery item you selected them from. I do this a little differently - when I select an Item from a gallery to navigate to a form, I do this

    Set(varID,ThisItem.ID);;
    Navigate( . . . . )

    then the Item of the form is 

    LookUp(
     MyListName;
     ID=varID
    )

    Then if I was patching like you, my Patch would be

    Patch(
     'Fiches Litiges';
     {ID:varID};
     Form2.Updates;;
     Form4.Updates;;
     Form5.Updates
    )

    I am assuming all the forms relate to the same record - so all you need is the ID of that record,

    I also assume you have updated the forms when testing this (it will only write fields changed)

     

    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.

  • Imade Profile Picture
    103 on at

    @WarrenBelz ,
    Yes the forms relate to the same record. I did what you told me but I still don't have anything on my SharePoint List 😞
    This the Variable : 

    image.png

     

    I add a button with the varID

    image.png

    and put this in the onselect

     

    Set(varID;ThisItem.ID);;
    Navigate([@ProduitsScreen];ScreenTransition.Fade)

     

    Maybe I forgot something, sorry I'm a beginner

     

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Imade ,

    Did you set the Item of the forms as per my post

    LookUp(
     'Fiches Litiges';
     ID=varID
    )

    I know you are a beginner but part of the process in the Learn forum is to understand the code. I am surprised that you are attempting multiple patches here rather than simply SubmitForm().

    I am simply setting a Variable to the ID of the current selected item then using that ID to display the required item in the forms. You can then also use the same Variable to Patch your form updates to the correct record.

     

    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.

  • Imade Profile Picture
    103 on at

    @WarrenBelz ,

    Yes I put it on every form in the item setting and it still not working.

    And for the second patches, it is used for the step indicator of my app
    image.png



  • Verified answer
    Imade Profile Picture
    103 on at

    Hello @WarrenBelz ,

    It works now !
    I modified the patch in the submit button like this and it works.
    Thank you very much for your help I have learned a lot.

     

    Patch(
    'Fiches Litiges';
    varID;
    Form2.Updates;
    Form4.Updates;
    Form5.Updates);;

     

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Imade ,

    You have accepted your own post as the solution. You might also consider accepting the guidance that helped you get there.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard