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

Pass multiple values from Power Bi selection to Sharepoint list

Hello everyone, I am fairly new to power apps and I am trying to pass multiple values in a sharepoint list(one for each row) 

 

In power Bi the only values I am passing is Id_user (unique) in the sharepoint linked to the same power bi . The powerapps contains an edit form where the title is the Id_user and has other items like comments date last modified by etc and a button that submits the form in a sharepoint list.

Currently I am able to pass one value at a time using filter and first but I would like to select multiple users in power Bi and have the same comments and other details populate multiple rows in my sharepoint list.

 

Ex selected id 1,3,7 in power bi 

the ids populate a row each plus the same comments added in the form .

 

Thanks in advance for the help.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Papa452 
If you want to create multiple new records with multiple IDs, I suggest you use ForAll():

ForAll(
  'PowerBIIntegration'.Data.Id,
  Patch(YourDataSource,Defaults(YourDataSource),{Column1:Id})
)

Or

ForAll(
 RenameColumns('PowerBIIntegration'.Data,"Id","IDD").IDD, /*Rename the Id field to eliminate ambiguity*/
 Patch(YourDataSource,Defaults(YourDataSource),{Column1:IDD})
)

 Best Regards,

Bof

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @Papa452 :

I'm not sure if my understanding is correct, please help me point it out if there are any errors.

  • You have embedded a CanvasApp in PowerBI.
  • You have filtered 3 records for this PowerAPP data source in PowerBI.
  • You want to update a field of the corresponding three records in the SharePoint List to a certain value in the Canvas App based on these three IDs [1,3,7]

If so,I suggest you use UpdateIf() function.I've made a test for your reference:

1\Add your SP List as a data source in the canvas app (Add a connection)

2\Add a Button and set it's OnSelelct proeprty to:

 

UpdateIf(YourSPList,ID in 'PowerBIIntegration'.Data.Id,{FieldName:"XXXX"})

If my understanding is incorrect, can you provide a more detailed description (it would be better if there are some screenshots)

 

Best Regards,

Bof

Hello @v-bofeng-msft  ,

 

Thanks for the quick answer. Your understanding of my issue was really close. 

 

  • I have an embedded Power Apps Canvas in Power 
  • I have filtered 3 records from the PowerBI data source in power BI 
  • I have those records fill the one column in the sharepoint list 
  • I want to create new records in the sharepoint list .( One for each record )

Currently what works is selecting one id at a time , adding new comments ,date, and creating a new record in the sharepoint list  . I have tried to concatenate the 3 items then trying to split it in power apps but it does not seem to work . 

 

Thanks

Hi @Papa452 
If you want to create multiple new records with multiple IDs, I suggest you use ForAll():

ForAll(
  'PowerBIIntegration'.Data.Id,
  Patch(YourDataSource,Defaults(YourDataSource),{Column1:Id})
)

Or

ForAll(
 RenameColumns('PowerBIIntegration'.Data,"Id","IDD").IDD, /*Rename the Id field to eliminate ambiguity*/
 Patch(YourDataSource,Defaults(YourDataSource),{Column1:IDD})
)

 Best Regards,

Bof

View solution in original post

Thanks bof patching seems to work . I am also adding all the other items in the editform and passing everything to Sharepoint.

 

thanks again 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,100)