Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How to extract value of Sharepoint list from lookup field after ClearCollect

Posted on by 8
Hi, I have 2 tables: testList and testLocation. In testList there is lookUp field that refers to testLocation.
I want to Collect some data from testList, but all fields that are a lookUp fields are returned as subtables.
I tried to Ungroup these, but it changes nothing. Perhaps because it is not groupped by groupBy.
How can I extract those values, so these are all accessible to me?
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    How to extract value of Sharepoint list from lookup field after ClearCollect
    "Secondary" fields in Lookup columns are not compatible with Power Apps in many aspects and should not be used. You are better using AddColumns with Lookups to get those field values.
    ClearCollect(
       colTestList,
       Ungroup(
          ShowColumns(
             AddColumns(
                testList,
                GroupField,
                With(
                   {
                      _Fields: LookUp(
                         YourOtherList,
                         YourLookedUpField = locc.Value
                      )
                   },
                   {
                      Place: _Fields.place,
                      Side: _Fields.side,
                      Title: _Fields.Title
                   }
                )
             ),
             Title,
             type,
             osVersion
             GroupField
          ),
          GroupField
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard