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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / traverse through singl...
Power Apps
Unanswered

traverse through single row using column names from another collection

(1) ShareShare
ReportReport
Posted on by 31

Hi,

Is it possible to traverse through a Lookup result reord by using another which had all the column names of the lookup record.

I tried below code but it is not working. Title field in ColTable collection has all the column names of myCol which is single row record(result of Lookup). 

 

ForAll(ColTable, Collect(newCol, First(myCol).ColTable.Title);

 

Thanks

Suji

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    ForAll is not necessary if you have just one Record anyway.

    Just try this

     

    //pseudocode
    Collect(newCol, First(myLookupResult))

     

     If you are having any issue, check the result.

    If there is only the internal GUID and the primary column name, and you only have two columns, you may need to explicitly perform the LookUp again, you can refer to these threads in case you have this issue where you are getting only two columns populated, when you are expecting more than 2 columns:

    Combo Box Selected Items - Lookup Field Issues 

    Combo box auto populated data not working with Patch or in email 

     

    Check if it helps @Sujimon 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    MyColumnNameMyColumnValue
    ColumnName11
    ColumnName22
    ColumnName33
    ColumnName44

     

    Even if you have the above Collection called someCollection for example,

    I don't believe you could refer to column names dynamically using the above collection and ForAll. The reason is that I don't believe, as far as I know, that it is possible to dynamically refer to column names in PowerApps in the construction of a Record. I would suggest you think of an alternate way to solve your problem.

     

    For example, I do not believe this is possible:

     

    //not possible - the below is not possible
    ForAll(someCollection As myItem,{myItem.MyColumnName:myItem.MyColumnValue})
    //the above is not possible, as far as I know

     

    I think it is not possible to do it like this, so I recommend you check about the underlying problem you are trying to solve rather than this specific way, and go from there and see if you could think of a different approach.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard