cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mszarka
Level: Powered On

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 Team
Community Support Team

Re: update excel cell to keep the previous data

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 Team
Community Support Team

Re: update excel cell to keep the previous data

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

Highlighted
mszarka
Level: Powered On

Re: update excel cell to keep the previous data

Hi 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 363 members 6,618 guests
Please welcome our newest community members: