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 / convert collection to ...
Power Apps
Answered

convert collection to a record

(0) ShareShare
ReportReport
Posted on by 47

Hi All

I have SharePoint list with 2 columns:

Code      Value

aa           qwe

ab          tre

ac           ert

which I need to convert to a record
    Record:{aa:"qwe",ab:"tre",ac:"ert"} 
Is there any way to do it with ForAll (or any other dynamic way)?
Thanks 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @romankorchak1 

    There is no way to achieve this automatically in PowerApps.  All column names for records must be definitively declared and cannot be implied by a formula.  So, in other words, all of the column names (aa, ab and ac) need to be typed into your formula.

    Given that, the following would give you want you want from your data sample:

    {aa: LookUp(yourList, Code="aa", Value), ab: LookUp(yourList, Code="ab", Value), ac: LookUp(yourList, Code="ac", Value)}

     

    I hope this is helpful for you.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard