cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Readd observation at same row

Dear Member,

 Is there any options to add more one time to only one row?

 

Best regards

Chi

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Readd observation at same row

Hi @Anonymous ,

For your first question, if you want to add a record but not complete all things into your data source, I think the Patch function could achieve your needs.

Please set the OnSelect property of the "Submit" button to following:

Patch(
         'YourExcelTable',
          Defaults('YourExcelTable'),
         {
           Column1: TextInput1.Text,
           Column2: TextInput2.Text,
... } )

Within the { } part of the Patch function, you could specify the columns you want to populate values for.

 

For your second question, if you want to update the existing record that I have added before, I think the Patch function could also achieve your needs.

Firstly, you need to find the existing record you want to update in your Excel table. You could find the record in your Excel table based on a PRIMARY Column (which identify one record uniquely) using LookUp function:

LookUp('YourExcelTable', PrimaryColumn = "A specific value")

Then set the OnSelect property of the "Update" button to following:

Patch(
       'YourExcelTable',
       LookUp('YourExcelTable', PrimaryColumn = "A specific value"),
{
ModifedColumn1: "xxxx",
ModifiedColumn2: "xxx",
...
} )

More details about the Patch function, 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

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Readd observation at same row

Hi @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to add record into your data source more times, but only store them in single one row?

 

If you want to add record into your data source more times, but only store them in single one row, I have made a test on my side, please take a try with the following workaround:

When you add new record into your data source first time, add the new record into your data source. Then when you add new record into your data source next time, modify the existing record with the new entry data.

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

If(
    IsBlank(First('YourDataSource')),                /*<-- Check if your data source has already one record stored */
    Patch(                                           /* <-- Add Record. If there is no record in your data source, add the new record */
              'YourDataSource',
               Defaults('YourDataSource'),
               {
                   Column1: TextInput1.Text,
                   Column2: TextInput2.Text,
                   Column3: TextInput3.Text,
                    ...
               }
    ),
    Patch(                                          /* <-- Edit existing reocrd. If there is already a record in your data source, update the existing record with your new data */
              'YourDataSource',
               First('YourDataSource'),
               {
                 Column1: TextInput1.Text,
                 Column2: TextInput2.Text,
                 Column3: TextInput3.Text,
                 ...
               }
    )
)

Note: The Column1, Column2, Column3 ... represents the columns in your data source.

Then you could add a Data Table control within your app, set the Items property to your data source. Then you would see the added data would be displayed only one row.

 

More details about the Patch function, 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.
Highlighted
Anonymous
Not applicable

Re: Readd observation at same row

Dear member, 

 Please see the following picture:Captura.PNG

Best regards

Chi

Highlighted
Community Support
Community Support

Re: Readd observation at same row

H @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to add new columns within your Excel table using PowerApps?

 

If you want to add new columns within your Excel table using PowerApps, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ide as Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

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.
Highlighted
Anonymous
Not applicable

Re: Readd observation at same row

Dear Member, 

 1st: I want to add a record but not complete all things.

 2nd: I want to full the record that I have added before.

 Is it posible to do that?

 

Best regards

Chi

Highlighted
Community Support
Community Support

Re: Readd observation at same row

Hi @Anonymous ,

For your first question, if you want to add a record but not complete all things into your data source, I think the Patch function could achieve your needs.

Please set the OnSelect property of the "Submit" button to following:

Patch(
         'YourExcelTable',
          Defaults('YourExcelTable'),
         {
           Column1: TextInput1.Text,
           Column2: TextInput2.Text,
... } )

Within the { } part of the Patch function, you could specify the columns you want to populate values for.

 

For your second question, if you want to update the existing record that I have added before, I think the Patch function could also achieve your needs.

Firstly, you need to find the existing record you want to update in your Excel table. You could find the record in your Excel table based on a PRIMARY Column (which identify one record uniquely) using LookUp function:

LookUp('YourExcelTable', PrimaryColumn = "A specific value")

Then set the OnSelect property of the "Update" button to following:

Patch(
       'YourExcelTable',
       LookUp('YourExcelTable', PrimaryColumn = "A specific value"),
{
ModifedColumn1: "xxxx",
ModifiedColumn2: "xxx",
...
} )

More details about the Patch function, 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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,702)