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

Add RowID to Collection

Hello,

How can I add a row ID to the collection below?

 

ClearCollect(TblRepairs,AddColumns(Filter(TblDefects, VehID=dbVeh.Selected.VehID),"Price",0)

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Add RowID to Collection

Hi @Prav 

 

From your expression, I think you want to filter out the results based on value select in the dropdown and add Price and SNo column into your collection. Please follow the below command to achieve that:
 
Clear(TblRepairs);ForAll(Filter(TblDefects, VehID=dbVeh.Selected.VehID),Collect(TblRepairs,{Price: Price,RowID:Last(TblRepairs).RowID+ 1}))
Here I have added the column for RowID. Currently It has only two columns, Price and RowId, but if you want to add more, they can be added inside the curly brackets.
 
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!
4 REPLIES 4
Super User
Super User

Re: Add RowID to Collection

Hi @Prav 

 

From your expression, I think you want to filter out the results based on value select in the dropdown and add Price and SNo column into your collection. Please follow the below command to achieve that:
 
Clear(TblRepairs);ForAll(Filter(TblDefects, VehID=dbVeh.Selected.VehID),Collect(TblRepairs,{Price: Price,RowID:Last(TblRepairs).RowID+ 1}))
Here I have added the column for RowID. Currently It has only two columns, Price and RowId, but if you want to add more, they can be added inside the curly brackets.
 
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!
Prav
Level: Powered On

Re: Add RowID to Collection

Thanks for your prompt response @yashag2255.

I can see the RowID, and added few columns from TblDefects.

However, I can still see all columns from TblDefects - how to exclude them?

 

Super User
Super User

Re: Add RowID to Collection

HI @Prav 

 

 
Can you share the snippet that you have modified? The same formula worked in my case and fetched only required columns. 
Prav
Level: Powered On

Re: Add RowID to Collection

All good now. I had to close and re-open the app.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 253 members 4,834 guests
Please welcome our newest community members: