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
Highlighted
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
Highlighted
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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,156)