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

Patch an Incremental ID to existing data in the Excel data source

I have an Excel file used as data source in powerapps and there are two columns within the excel.

First column - "Id" 

Second column called - "addresses"

 

For the Id column, I want to be able to patch an incremental ID to all five rows (There can be any number of addresse so 5 rows is just an example - so the patch function needs to be dynamic) in the Id column so that each row can be uniquely identified by the ID..

 

 

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @IAmTheAppUser 

 

Can you try out the expression as:
 
Patch(ExcelTable,Defaults(ExcelTable),{Id:Value(Last(ExcelTable).Id) +1 , addresses: "Address1"}); Refresh(ExcelTable)
 
Here, ExcelTabel is the name of my excel table. and once the data is patched, make sure that you are refreshing the datasource, so that it points to the latest set of records and this will avoid duplication of the Id.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks for the help.

 

I think the formula that you provides allows me to only add 1 ID under my 'Id' column. 

 

(Before starting the app) The ‘ID' column from my excel data source is empty, therefore, I want the app to (After the app starts) add a ID to each exisiting row without checking the values under the 'address' column (becauses If I need to check the values in the addresses, I won't be able to patch incremental ID to all of the rows in the excel data source right?). 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,955)