Can anyone help me on how can I add few field records of one table to another in powerapps?.
I am updating a table "A" with data using gallery .Now I want to add some field records to another table "B" from table "A"
Solved! Go to Solution.
Hi @PriyaShetty
The way to do this is to call the Patch function to add your records to Table B.
@eka24's code here gives a good example.
Here's a link to online documentation for Patch.
https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-patch
Hi @PriyaShetty
You're welcome!
You can use the GroupBy and Sum functions to do this.
Here's the help page.
https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-groupby
Your formula would approximately look like this. This will return a table with the columns Pid and SumOfRating.
AddColumns(
GroupBy(TableA, "Pid", "GroupedItems"),
"SumOfRating",
Sum(GroupedItems, Rating)
)
Hi @PriyaShetty
The way to do this is to call the Patch function to add your records to Table B.
@eka24's code here gives a good example.
Here's a link to online documentation for Patch.
https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-patch
@timl Thank You.This solution worked for me.As I have one more query on how can sum all the field values .
Below is the table
Pid Rating
201 2
201 3
201 1
301 2
301 1
so i should get sum of rating for all pid 201 as 6 and for 301 as 3
Hi @PriyaShetty
You're welcome!
You can use the GroupBy and Sum functions to do this.
Here's the help page.
https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-groupby
Your formula would approximately look like this. This will return a table with the columns Pid and SumOfRating.
AddColumns(
GroupBy(TableA, "Pid", "GroupedItems"),
"SumOfRating",
Sum(GroupedItems, Rating)
)
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
204 | |
70 | |
51 | |
48 | |
20 |
User | Count |
---|---|
258 | |
120 | |
85 | |
80 | |
68 |