cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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

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
Frequent Visitor

Re: update excel cell to keep the previous data

Hi 

 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,282)