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 / How to Update All Data...
Power Apps
Answered

How to Update All Data Rows in DataTable and Data Table is inside DataCard

(0) ShareShare
ReportReport
Posted on by 34
Hi, I use Data Table inside Data Card.
and I'd like to save all item from data table to sharepoint list by using data card Update function.
but I can't use ForAll.
 
This picture is example.
I try with this fomular but it's not work.
ForAll(colData,
Patch(
    tbl_detailActivities,
    LookUp(
        tbl_detailActivities,
        activityNo=DataCardValue17.Text
    ),
    {
        DataSubjectRights: tbl_dataRight.Selected.legalBasisDesc
    }
)
)
Thank you in advance for any suggestion.
I have the same question (0)
  • Verified answer
    vipuljain03 Profile Picture
    673 Super User 2026 Season 1 on at
    You're facing an issue because the Update property of a DataCard is meant to return a single record, not multiple records. Since ForAll performs a loop to patch multiple records, it doesn't work inside Update.
     
    Solution Approach (recommended):
    Instead of trying to use ForAll inside the DataCard's Update property, handle the save operation outside the form submission process using a button's OnSelect property. You can use ForAll inside a button's OnSelect event like below:
    ForAll(
        colData,
        Patch(
            tbl_detailActivities,
            Defaults(tbl_detailActivities), // If adding new records
            {
                activityNo: DataCardValue17.Text,
                DataSubjectRights: tbl_dataRight.Selected.legalBasisDesc
            }
        )
    );
    ➡️This code will loop through colData and create a new record in tbl_detailActivities for each item.
     
    In case, you need to use the Update property of the Datacard, try concatenating the values into a single text field and then splitting it back in Power Automate when saving to SharePoint. But this approach requires additional handling in Power Automate to split and store the data properly.
    Concat(colData, activityNo & "|" & tbl_dataRight.Selected.legalBasisDesc & ";")
    ---------------------------------------------
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too!
     
    Thanks,
    Vipul
  • Ram Prakash Duraisamy Profile Picture
    5,775 Super User 2026 Season 1 on at
    Hi,
     
    Are you expecting to create a new Record or update ?
     
    If it is create use Defaults(tableName) instead of Lookup

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard