web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch multiple forms w...
Power Apps
Unanswered

Patch multiple forms with complex fields to SharePoint

(0) ShareShare
ReportReport
Posted on by 169

Hi guys,

I would like to know the best method for Patching multiple forms with complex fields back to a SharePoint list?   I have a Canvas app with multiple screens (about 3-4).  Each of these screens show different forms.  At least two of this screens show different forms depending on the value of a selected choice in the previous screen.

Currently, I am using the !IsBlank function to Patch only the forms which were filled out, and using the Form.Updates method to ensure new records are patched accordingly.   The part I'm having a hard time figuring out is the syntax necessary to submit all of the form updates along with the complex fields.

Any advice is helpful!  Thanks 

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @illmatic ,

    If you are using the form then no need patch, simply submit the form on the last screen.

    Like - First Submit the First Form and get the LastSubmit ID and Use the same LastSubit ID for Update the Record.

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

  • illmatic Profile Picture
    169 on at

    Hi  @VijayTailor ,

    Thanks for replying.  I do not understand what you mean with the first sentence.  I'm using all of the forms... they are all different and located on different screens. Seems like this would only work if the user is going back to make updates to the first one, or did I misunderstand?

    Also, this does not address my main pain point, which is how do I submit complex fields back to a SharePoint list will simultaneously submitting several different forms [some of which have the complex fields in them] while maintaining only one record.

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @illmatic ,

    My Approach works Like below.

     You had a multiscreen with multiple Form

    First Approach - On YOu Filled the Data for First  Form then On Next button you submit the First Form and OnSuccess Property you can get the Last Submit ID.

    Set(LastRecord,Form12.LastSubmit)

    Now For the rest of the Form Set the DefaultForm Mode Edit.
    and in Items Property you can set the last record.
    and once the data Filled then Submit this form also, so Once you submit this automatically it will Update the Same Record remaining Field but if the source is different then you can use the last submit ID as Mapping Purpose. and Keep the Form Mode as New.

    Second Approach (You can use your Logic) But- For Patching Complex Field Like Lookup Column / Or Choice Column / Or People Group Column then you can use Code Like below -

    //For Patching Lookup/Complex Field into SP
    'Project Name':{
     Id:ProjectID,
     Value: Project,
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     }
    //For Patching Choices/Complex Field into SP
     WorkType:{
     
     Value: WorkType,
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
    
    //For Patching People or Group /Complex Field into SP
    varCurrentUser = User() function
    User: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|"&Lower(varCurrentUser.Email),
     DisplayName: varCurrentUser.FullName,
     Email: Lower(varCurrentUser.Email),
     Picture: varCurrentUser.Image,
     Department: "",
     JobTitle: ""
    
     }

    Thanks,
    Vijay

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay



     


     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard