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.
Solved! Go to Solution.
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
Hi @Papa452 :
I'm not sure if my understanding is correct, please help me point it out if there are any errors.
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.
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
Thanks bof patching seems to work . I am also adding all the other items in the editform and passing everything to Sharepoint.
thanks again
User | Count |
---|---|
166 | |
96 | |
79 | |
72 | |
59 |
User | Count |
---|---|
210 | |
167 | |
98 | |
93 | |
78 |