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

update excel cell to keep the previous data

Hi,

I am looking for a solution to keep my excel data and update it with the new one and with the date.

 

like old data: " 01/15/2019 I love chocolate"

user edit : "me too"

new data in the cell: "01/17/2019/ me too 01/15/2019 I love chocolate"

 

any Idea? I tried collection but I can not insert it to the excel cell.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @mszarka,

Could you please share a bit more about your scenario?

How do you update your Excel table data? Using Patch function?

Further, could you please share more details about the data structure of your Excel table?

I have made a test on my side, please take a try with the following workaround:

The data structure of Excel table as below:1.JPG

App's configuration as below:2.JPG

 

3.JPG

Within my app, I add a Data Table control to list all records in my Excel table. You could consider add a Data table control to list your Excel table records, when you want to update a specific item, please select it within the Data table.

Set the OnSelect property of the "Patch" button to following:

Patch(
    CommentTable,
    LookUp(CommentTable, Comment_x0020_ID = DataTable1.Selected.Comment_x0020_ID), /* <-- The Comment ID represents the primary column in my Excel table, which could identify one record uniquely*/
    {
       Comment_x0020_Content: Today() & " "&TextInput1.Text& " "& LookUp(CommentTable, Comment_x0020_ID = DataTable1.Selected.Comment_x0020_ID, Comment_x0020_Content)  /* <-- Comment Content column represents the column whose value you want to update */
    }
)

On your side, you should type:

Patch(
    YourExcelTable,
    LookUp(YourExcelTable, PrimaryColumn = DataTable1.Selected.PrimaryColumn), /* <-- Find the specific record you want to update firstly */
    {
       TargetColumn: Today() & " " &TextInput1.Text& " "& LookUp(YourExcelTable, PrimaryColumn = DataTable1.Selected.PrimaryColumn, TargetColumn)
    }
)

Note: The TargetColumn represents the column whose value you want to update within your Excel table. The TextInput1 represents the Text Input control where the user could type his text.

Please check the attached GIF screenshot for more details:

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @mszarka,

Could you please share a bit more about your scenario?

How do you update your Excel table data? Using Patch function?

Further, could you please share more details about the data structure of your Excel table?

I have made a test on my side, please take a try with the following workaround:

The data structure of Excel table as below:1.JPG

App's configuration as below:2.JPG

 

3.JPG

Within my app, I add a Data Table control to list all records in my Excel table. You could consider add a Data table control to list your Excel table records, when you want to update a specific item, please select it within the Data table.

Set the OnSelect property of the "Patch" button to following:

Patch(
    CommentTable,
    LookUp(CommentTable, Comment_x0020_ID = DataTable1.Selected.Comment_x0020_ID), /* <-- The Comment ID represents the primary column in my Excel table, which could identify one record uniquely*/
    {
       Comment_x0020_Content: Today() & " "&TextInput1.Text& " "& LookUp(CommentTable, Comment_x0020_ID = DataTable1.Selected.Comment_x0020_ID, Comment_x0020_Content)  /* <-- Comment Content column represents the column whose value you want to update */
    }
)

On your side, you should type:

Patch(
    YourExcelTable,
    LookUp(YourExcelTable, PrimaryColumn = DataTable1.Selected.PrimaryColumn), /* <-- Find the specific record you want to update firstly */
    {
       TargetColumn: Today() & " " &TextInput1.Text& " "& LookUp(YourExcelTable, PrimaryColumn = DataTable1.Selected.PrimaryColumn, TargetColumn)
    }
)

Note: The TargetColumn represents the column whose value you want to update within your Excel table. The TextInput1 represents the Text Input control where the user could type his text.

Please check the attached GIF screenshot for more details:

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (1,769)