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 function with SP...
Power Apps
Answered

Patch function with SP List : fields are empty

(0) ShareShare
ReportReport
Posted on by 131

Hello,

I'm having troubles using the Patch Function.

 

My function syntax seems to be OK (no error mentioned in the editor), I'm trying to patch text fields to text columns, and a date field to date column, but when I execute the function, it only records the Title and date fields in my list.

All other text fields are blank / empty.

 

Any idea about what's going wrong ?

 

Thanks for your help.

 

R.

 

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @RSygroves ,

     

    Could you please show the Patch formula? We expect more details.

     

    Best regards,

    Rimmon

  • RSygroves Profile Picture
    131 on at

    Hi,

    it's a rather complex process as my Patch function works with two secondary lists :

     

    If(
     LookUp(
     Entreprises;
     Titre = DataCardValue7.Text;
     true
     );
     Patch(
     'Contacts Ets';
     Defaults('Contacts Ets');
     {
     Titre: DataCardValue7.Text;
     ContactGRETA: DataCardValue15.Selected.Value;
     Fonctioninterlocuteur: DataCardValue9.Text;
     Datecontact: DataCardValue1.SelectedDate;
     Mailinterlocuteur: DataCardValue11.Text;
     Objet: DataCardValue12.Text;
     Prenominterlocuteur: DataCardValue4.Text;
     Nominterlocuteur: DataCardValue3.Text;
     Telinterlocuteur: DataCardValue10.Text
     }
     );
     Patch(
     Entreprises;
     Defaults(Entreprises);
     {
     Titre: DataCardValue7.Text;
     Fonction: DataCardValue9.Text;
     Mail: DataCardValue11.Text;
     Prenom: DataCardValue4.Text;
     Nom: DataCardValue3.Text;
     Tel: DataCardValue10.Text;
     Adresse: DataCardValue8.Text
     }
     );;
     Patch(
     'Contacts Ets';
     Defaults('Contacts Ets');
     {
     Titre: DataCardValue7.Text;
     ContactGRETA: DataCardValue15.Selected.Value;
     Fonctioninterlocuteur: DataCardValue9.Text;
     Datecontact: DataCardValue1.SelectedDate;
     Mailinterlocuteur: DataCardValue11.Text;
     Objet: DataCardValue12.Text;
     Prenominterlocuteur: DataCardValue4.Text;
     Nominterlocuteur: DataCardValue3.Text;
     Telinterlocuteur: DataCardValue10.Text
     }
     )
     )
    )
  • CU18061035-1 Profile Picture
    Microsoft Employee on at

    do you mean its empty in the app or in the SP List?

  • RSygroves Profile Picture
    131 on at

    Actually, everything works fine with my condition, LookUp and Patch functions (i.e the app writes datas in the proper list, depending on the condition) excepted the fact that only One filed (title) is correctly saved in one list or the other. 

  • RSygroves Profile Picture
    131 on at

    In the SP list.

    All datas come from a form in the app whose first goal is to save datas in a principal SP list with SubmitForm.

    But there are some datas in a specific scenario that I want to be able to also save in two other lists, hence the Patch function.

      

  • RSygroves Profile Picture
    131 on at

    Hello @v-mengmli-msft  

    does this help ?

     

  • RSygroves Profile Picture
    131 on at

    + I have another screen which is used to update a specific record afterwards, here the patch function is more simple, and works fine with every field, even with a condition :

    Patch(
     'Contacts Ets';
     Defaults('Contacts Ets');
     {
     Titre: DataCardValue7.Text;
     ContactGRETA: DataCardValue15.Selected.Value;
     Fonctioninterlocuteur: DataCardValue9.Text;
     Datecontact: DataCardValue1.SelectedDate;
     Mailinterlocuteur: DataCardValue11.Text;
     Objet: DataCardValue12.Text;
     Prenominterlocuteur: DataCardValue4.Text;
     Nominterlocuteur: DataCardValue3.Text;
     Telinterlocuteur: DataCardValue10.Text
     }
     )
      

    May the problem come from the addition of several patch functions ?

     

  • RSygroves Profile Picture
    131 on at

    No idea as to why it does'nt work, anybody ?

     

  • Verified answer
    RSygroves Profile Picture
    131 on at

    Just found the solution on my own, replacing the Patch functions with Collect ones.

     

    Solved !

     

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