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 / Retriving data back fr...
Power Apps
Answered

Retriving data back from multiple lists to edit

(0) ShareShare
ReportReport
Posted on by 254 Moderator

Im trying make a function where you can edit already done inspections, im trying to retrive data back from 3 lists, and decided to retrieve them back into collection.

 

How can get "Answer" value to be correct for each record ,right now with this formula it gets the value of the first record in 'Inspection answers' and puts it on all records in the collection

 

This formula is in a gallery onselect on an already done inspection

 

 

 

 

ClearCollect(
 colQuestionsEdit,
 AddColumns(
 ShowColumns(
 QuestionList,
 "ID",
 "Title",
 "TitleENG",
 "TitleRU",
 "Requirement",
 "RequirementENG",
 "RequirementRU",
 "Value",
 "Order" ),
 "Answer",
 LookUp('Inspection answers',ThisItem.ID=ResponseID).Answer,
 "Values",
 "",
 "Comment",
 "",
 "Score",
 "",
 "MinusScore",
 ""
 )
); 

 

 

 

 

 

I assume it can be done with ForAll, but i dont know how to integrate it

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Jiis ,

    Try this

    ClearCollect(
     colQuestionsEdit,
     AddColumns(
     ShowColumns(
     QuestionList,
     "ID",
     "Title",
     "TitleENG",
     "TitleRU",
     "Requirement",
     "RequirementENG",
     "RequirementRU",
     "Value",
     "Order" ),
     "Answer",
     LookUp('Inspection answers',ResponseID = ID).Answer,
     "Values",
     "",
     "Comment",
     "",
     "Score",
     "",
     "MinusScore",
     ""
     )
    ); 

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Jiis Profile Picture
    254 Moderator on at

    Hi @WarrenBelz

    Thank you for replying

    This does not seem to work. Now im getting "?" in my records.  In here ResponseID and ID are being compared and i think they come from the same list, ThisItem.ID comes from another list.

  • Verified answer
    WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @Jiis ,,

    Where are you running this from as a ThisItem reference needs to be inside a Form or a Gallery. The problem is if you refer to ThisItem.ID, you will always get the same record reference. Usually with AddColumns, you would need to refer to the ID of each record (so just plain ID) so each could look up the other list.

    I am now quite unclear what you are trying to achieve here.

  • Verified answer
    Jiis Profile Picture
    254 Moderator on at

    @WarrenBelz 

    Thank you for making me realize, I found the solution, i had two mistakes, since ID column exists in every list lookup didnt know which one to pick, so i renamed the id column. And also i didnt make the connection between Question Id and  Answer ID, this is the formula 

    ClearCollect(
     colQuestionsEdit,
     AddColumns(
     RenameColumns(
     ShowColumns(
     QuestionList,
     "ID",
     "Title",
     "TitleENG",
     "TitleRU",
     "Requirement",
     "RequirementENG",
     "RequirementRU",
     "Value",
     "Order"
     ),
     "ID",
     "IID"
     ),
     "Answer",
     LookUp(
     'Inspection answers',
     IID = QuestionID && ThisItem.ID = ResponseID
     ).Answer,
     "Values",
     "",
     "Comment",
     "",
     "Score",
     "",
     "MinusScore",
     ""
     )
    );

     

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