cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hnguy71
Level 8

Collection Lookup To Retrieve Values from Sharepoint list

Hi All.

 

Another issue with PowerApps.

 

I have created a collection called _MyTeams with the below code:

 

ClearCollect(_MyTeams, {displayName: ""}); Collect(_MyTeams, MicrosoftTeams.GetAllTeams().value.displayName)

 

This works in grabbing the necessary information that I need for step 1. The next step I wanted to do is to collect all the Geomarket associated with the team name.  The errors I'm receiving is that I'm having an invalid argument type. 

 

error_new.PNG

 

So the result should be:

 

TeamSample1 - GM1

TeamSample2 - GM2

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Collection Lookup To Retrieve Values from Sharepoint list

@hnguy71 

Change your formula to this:

ClearCollect(_GM, ….<your other collections.…"Upload Document"}); 
ClearCollect(_MyTeams, {displayName: "", Geomarket:""});
Collect(_MyTeams, ForAll(MicrosoftTeams.GetAllTeams().value.displayName, {displayName:displayName, GeoMarket:Lookup('Team Registration', 'Team Name'=displayName).Geomarket}))

This will give you a two column collection (displayName and Geomarket) with the looked-up values you want.

 

I hope that is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Collection Lookup To Retrieve Values from Sharepoint list

@hnguy71 

Change your formula to this:

ClearCollect(_GM, ….<your other collections.…"Upload Document"}); 
ClearCollect(_MyTeams, {displayName: "", Geomarket:""});
Collect(_MyTeams, ForAll(MicrosoftTeams.GetAllTeams().value.displayName, {displayName:displayName, GeoMarket:Lookup('Team Registration', 'Team Name'=displayName).Geomarket}))

This will give you a two column collection (displayName and Geomarket) with the looked-up values you want.

 

I hope that is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

hnguy71
Level 8

Re: Collection Lookup To Retrieve Values from Sharepoint list

After looking at your code, I understand what I did wrong. Love all this learning! Thanks again for the generous help! ^_^

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,767)