cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RomanKorchak
Helper IV
Helper IV

Add variable to each item in SharePoint list data via Collect

Hi 

I have a few SP list that I get into one list in my app via Collect function.

  Collect(AppList, Clients1.Company_Name );    Collect(AppList, Clients2.Company_Name) ;

Is there a way to add a value to each item inthe list, something like 

  Collect(AppList, Clients1.Company_Name, newValue:"fromClients1" );   

  Collect(AppList, Clients2.Company_Name, newValue:"fromClients1") ;

It doesnt give me any errors but if I use it in the app the value is empty.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@RomanKorchak 

 

Try something like this:

 

Collect(AppList, AddColumns(Clients1.Company_Name, "newValue", "fromClients1"));   
Collect(AppList, AddColumns(Clients2.Company_Name, "newValue", "fromClients2")) ;

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@RomanKorchak 

 

Try something like this:

 

Collect(AppList, AddColumns(Clients1.Company_Name, "newValue", "fromClients1"));   
Collect(AppList, AddColumns(Clients2.Company_Name, "newValue", "fromClients2")) ;

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,055)