web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection from a list...
Power Apps
Answered

Collection from a list's lookup column which content comes from another list's lookup column

(1) ShareShare
ReportReport
Posted on by 98
Hi.
 
I'm building a powerapp that relies on SharePoint lists related to each other in a cascade manner:
 
The "first":
 
The "second":
 
The "third":
 
"Posto de Trabalho" in tbl_postos is the source to the lookup "Posto de trabalho" in tbl_inspecoes, and "ID" in tbl_inspecoes is the source to the lookup "Inspeção" in tbl_riscos_identificados.
Following these instructions (@RezaDorrani, thank you for your videos!), I've got stuck where I must create a collection. My problem is that, differently from the instructions, my data source is another lookup column instead of text. The code
 
<Code>ClearCollect(colGridData, Filter(Tasks, 'Project Lookup'.Value = RecordsGallery1.selected.Title))</Code>
 
Returns incompatibility of data types, what makes sense, becase (I think) the ".Value" in my 'Project Lookup' is another lookup.
So, is it possible to create this collection in a way that it takes the value from a lookup which data comes from another lookup?
 
Thank you in advance!
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
     
    While you have them called Table is this actually SharePiont?
  • William_Azevedo Profile Picture
    98 on at
    Hi, @Michael E. Gernaey, I'm sorry for not answeting your post directly, the reply button doesn't appear in it to me for some reason.
    And also sorry for the confusion: yes, when I say Table I mean SharePoint List.
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
     
    Are you still stuck here?
     
    Also I want to verify these are actual LookUps, normally (for me) i try not to use lookups ever if I do not have too. The issue is the complexity create, even in these situations.
     
    Its better to use just the ID everywhere and use LookUp or Filter, especially when it's a Single
     
    Personally I would recommend changing your data model and only use ID instead of lookups. It would make your stuff so much easier.
     
    Also what is ProjectLookup? If your lists are called the above names tbl stuff.
     
    ok let's try to lol move forward just in case you are stuck
     
    ClearCollect(colGridData, Filter(Tasks, 'Project Lookup'.Value = RecordsGallery1.selected.Title)
     
    Questions: Where is Tasks at in this equation? What does RecordsGallery1.Selected.Title represent?
     
    If this is a new app.. i would really rethink this and use ID's all around versus these LookUps, it will make your life way easier.
     
    I will answer once you answer my questions there .
     
    Thanks

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • William_Azevedo Profile Picture
    98 on at
     
    Are you still stuck here?
    Yes!
     
    Also I want to verify these are actual LookUps, normally (for me) i try not to use lookups ever if I do not have too. The issue is the complexity create¹, even in these situations.
    Its better to use just the ID everywhere and use LookUp or Filter, especially when it's a Single
    Personally I would recommend changing your data model and only use ID instead of lookups². It would make your stuff so much easier.
    1. I'm seeing it.
    2. Now I realize that I made the mistake of trying to adapt my data model to be able to follow the tutorial. Lesson learned (I think).
     
    Also what is ProjectLookup? If your lists are called the above names tbl stuff.
    I think it's the text from the tutorial. But at this point, I admit that i'm not sure if that's the case or if I hid this column in the list view. See point 2 before. :/
     
    If this is a new app.. i would really rethink this and use ID's all around versus these LookUps, it will make your life way easier.
    It is. And I think I'll try this suggestion. That being the case, I'll try to find answers to each step where I have doubts here.
     
    Since I took another path as suggested in your reply, I believe it counts as an answer.
     
    Thank you, Michael!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard