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 / Auto-Populating Multi-...
Power Apps
Unanswered

Auto-Populating Multi-People Picker and Attachments fields with no form control

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have built a no-form control form and so far have been able to get it working perfectly for entering data. I am now trying to get the form to work for editing. RiskID is passed as a parameter through the URL (sample: AP000368). The RiskID received tells me which list and which item the user wishes to preload into the form in order to view or edit. Typically, the following format in the APP section does the trick:

 

Set(VarParamTitle,LookUp('Asia Pacific', RiskID = myparamRiskID, Title));

 

Then I place the variable in the "Default" section for the field and it then loads the appropriate data. I have many lines like this as it is a big form and there are 11 potential data sources that it could be from. Here are my issues:

  • When trying to populate a combo box field converted into a multi-people picker field it doesn't populate. I realize that it is expecting an input similar to this:

 

{
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Claims: "i:0#.f|membership|" & ThisRecord.Mail,
 Department: "",
 DisplayName: ThisRecord.DisplayName,
 Email: ThisRecord.Mail,
 JobTitle: "",
 Picture: ""
}​

But likely several of these if it has more than one person entered. How do I lookup this info from a sharepoint list and then craft it into this format so that i can pre-populate a field? Maybe a collection? I have four of these fields to do. Names are "Risk Owner(s)", "Treatment Owner(s) 1", "Treatment Owner(s) 2", and "Treatment Owner(s) 3". Here's my try that doesn't work (maybe someone can fix it):

ForAll(
 LookUp('Asia Pacific', RiskID = myparamRiskID, 'Risk Owner(s)'),
 Collect(
 colRiskOwnersToPopulate,
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Claims: "i:0#.f|membership|" & LookUp('Asia Pacific', RiskID = myparamRiskID, 'Risk Owner(s)'.Mail),
 Department: "",
 DisplayName: LookUp('Asia Pacific', RiskID = myparamRiskID, 'Risk Owner(s)'.DisplayName),
 Email: LookUp('Asia Pacific', RiskID = myparamRiskID, 'Risk Owner(s)'.Mail),
 JobTitle: "",
 Picture: ""
 }
 )
);​

Thoughts?

 

  • The other issue i'm having is with Attachments of course. I'm using an Attachments field that was copied out of a form control. To use it in my intake form i had to use Flow and/or a Patch but Flow proved easier. Now i'm trying to read sharepoint to see if the item has any attachments and then populate them as saved items in the field. 
    - i realize that this may need to be done differently and that i might need to filter a gallery to display the attachments or
    - potentially i remove the attachments component i added and add a form control with just the attachments, filter it and give it its own save button. 
    Which method works, so far i can't get it to work.
  • Why did i build this form with no form control? The form needed to be responsive and fill the screen. I found the form control and data card method very clunky and hard to configure for layout. Previous developer failed to please the client layout-wise and so this is the second attempt with no form control and so far layout is perfect (except for the two points above)
Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Patch does not support attachments but if you put a form on the screen say Form1, but just include the attachments field.  Set the datasource and Item property appropriately on the form and in your Patch, include  following {yourfields:...}, Form1.Updates)  

     

    You can even create a new blank record with the attachments from the form control with the following formula

     

     Patch(
     Yourlist,
     Defaults(Yourlist),
     {},
     //Required to add attachments
     Form1.Updates;
     )

    and you can fill in the rest of your data from your free-form controls.

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'm not trying to patch attachments. I was able to get the attachments into my list via a workflow. What i'm trying to do now is get the from sharepoint into a new form so that the user can add or remove them. I will still use the workflow to get them back on the site. I just want to be able to pull from sharepoint and see them in an edit form. This would be the same for the multipeople picker fields as well. Just help me toview whats already in the list without a form control (datacards and stuff).

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Is it possible to patch a field on the screen based on values in a hidden form? In your logic how do i point to a field on the screen and not the list?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard